Your SlideShare is downloading. ×
Facebook integration into wordpress
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Facebook integration into wordpress

1,349
views

Published on

Some notes on integrating Facebook Open Graph into Wordpress. Also notes on how to use facebook API to put comments on the site as opposed to just in the iframe.

Some notes on integrating Facebook Open Graph into Wordpress. Also notes on how to use facebook API to put comments on the site as opposed to just in the iframe.

Published in: Self Improvement, Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,349
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Facebook Integration into Wordpress
  • 2. FB Open Graph Protocol
    • http://developers.facebook.com/docs/opengraph/
  • 3. FB Open Graph Protocol
    • ADD THE HEADER
    • <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xmlns:og=&quot;http://ogp.me/ns#&quot; xmlns:fb=&quot;http://www.facebook.com/2008/fbml&quot;>
  • 4. FB Open Graph Protocol
    • ADD META TAGS
    • <!-- Open Graph FBML -->
    • <meta property=&quot;og:title&quot; content=&quot;&quot;/>
    • <meta property=&quot;og:type&quot; content=&quot;website&quot;/>
    • <meta property=&quot;og:url&quot; content=&quot;&quot;/>
    • <meta property=&quot;og:image&quot; content=&quot;logo image&quot;/>
    • <meta property=&quot;og:site_name&quot; content=&quot;&quot;/>
    • <meta property=&quot;fb:admins&quot; content=&quot;USER_ID&quot;/>
    • <meta property=&quot;og:description&quot; content=&quot;&quot;/>
    • <meta property=&quot;fb:admins&quot; content=&quot;&quot; /> <meta property=&quot;fb:page_id&quot; content=&quot;&quot; />
  • 5. FB Open Graph Protocol
    • Like Button:
    • <fb:like href=“liked-url.com/&quot; width=&quot;450&quot; height=&quot;80&quot;/>
    • Comments:
    • <fb:comments class=&quot; fb_iframe_widget&quot; width=&quot;600&quot; num_posts=&quot;100&quot; href=&quot;http://commented-url.com&quot;>
    < ? php comments_template(); ?> < ? php comments_template(); ?> < ? php comments_template(); ?> < ? php comments_template(); ?> < ? php comments_template(); ?> < ? php comments_template(); ?> < ? php comments_template(); ?> < ? php comments_template(); ?> < ? php comments_template(); ?>
  • 6. Wordpress
    • WHERE DO I PUT THIS STUFF?
      • Header.php
      • page.php
  • 7. Wordpress
    • Xml header and meta tags paste into header.php
    • Js script (like, comment, etc) – paste into page.php (comments template();)
  • 8. Wordpress
    • Important WP variables
    • wp_title();
    • get_permalink();
    • bloginfo('description');
    • the_excerpt_rss();
  • 9. FB WHERE’S MY SEO?
    • Social Plugins are iframes
  • 10. FB API
    • Returns Objects
    • Example: comment Object
    • https://graph.facebook.com/comments/?ids=URL
  • 11. FB API
    • Object Comment documentation
    • http://developers.facebook.com/docs/reference/api/Comment/
  • 12. FB API
    • FB Object to array
    • $decoded=json_decode(file_get_contents(&quot;https://graph.facebook.com/comments/?ids=<?php echo get_permalink(); ?>&quot;),true);
  • 13. PLUG IT IN
    • WP standard documentation
    • Add_action($hook, array($class, $method))
  • 14. FB Open Graph Protocol
    • http://developers.facebook.com/docs/opengraph/

×