Following the first post on how to Integrate Facebook friend connect to your WordPress thesis theme using the simple Facebook plugin ,in this post I will show how to Manually add Facebook friend connect to your thesis theme.

Step-1
All you need to do go to Facebook developers sections and create a new application,name it what ever you want ,agree with the terms and conditions and click on create application.
Go to wordpress Developers section
Copy the API key from this window onto a notepad(will be needed later on)
Step-2
Copy and paste the code given below in your text editor.(You can also get it from Facebook)
Save the file with the name-xd_receiver.html ( preferably somewhere in your desktop)
<!--DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Cross-Domain Receiver Page
Save the file with the name-xd_receiver.html (somewhere in your desktop) and upload it to the custom folder of your thesis theme.
Step-3
Copy the api key from your facebook application window or notepad and paste this in the place of [API_key] in the script given below
This goes in your custom_funtions.php file ,non thesis users need to put this in their functions.php file.
add_action('thesis_hook_after_post', 'fb_comment_box'); add_action('thesis_hook_after_post', 'fb_comment_plug'); add_filter('language_attributes', 'add_fb_xml_ns'); function add_fb_xml_ns($content) { return ‘ xmlns:fb=”http://www.facebook.com/2008/fbml” ‘ . $content; } function fb_comment_box() { if (is_single()) { ?> <a name=”fb_comments”></a> <p>Comments:</p> // <!--[CDATA[--> src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"> // ]]> <fb:comments></fb:comments> // <!--[CDATA[--> FB.init("[API_KEY]“, “http://www.yoursitename.com/wp-content/themes/thesis_16/custom/xd_receiver.html”); // ]]> <?php } } function fb_comment_plug() { if (!is_single() && !is_page()) { ?> <p><a href=”<?php echo get_permalink(); ?>#fb_comments”>Add a comment</a></p> <? } }
That done now go ahead and have a look at the options you have for you faceboook application that you just created.
Remember to go to the connect option and enter you callback url in their as shown in the picture below.
Enter your blogs url in the place marked with arrow
Note:-Their will not a be and option for the commenter to enter the url of his/her blog while he/she is commenting.
Below are some screen shots of what this will look once implemented.
Facebook comment box
This is how commentors profile will look like on your blog
Note:-Their will not a be and option for the commenter to enter the url of his/her blog while he/she is commenting.
Administration options
You can moderate the comments from the front end of your blog
Found this hard read this post integrate Facebook friend connect with thesis theme use the simple Facebook connect plugin.
Subscribe Updates, Its FREE!


![[Thesis Theme] How To Display Affiliate Ad Box After Post](http://www.shoutmeloud.com/wp-content/uploads/2010/12/ad-box-550x403.png?699e3a)

→
{ 11 comments… read them below or add one }
very nice explaination
thanks for this one. very good tutorial indeed.
Nice post Shoaib.
Btw, does this method works for all templates, I am kinda thinking of integrating this at my blog – http://www.beingpc.com
It has arthemia free theme in it can I use it, I don’t want to lose somrthing.
yeah you can use this method to integrate fb with any theme,just place the code in your functions.php and ur good to go.
Thanks buddy, will try it soon.
excellent guest post, shoaib, quite a detailed explanation, am a non thesis user so will just need to find out the functions file,
Wow man, this is great stuff. I saw this only in Disqus and that sort of commenting platforms, and also on Tech Crunch.
Very nice post.. This is what I am looking for from a long time.. Thanks for the coding..
this thing really worth can help to the people to setup it wid easy way!
Aint really working for me…trying to debug!
hi,
please were do i upload the xd_receiver.html file to, i have a woo theme with no custom folder and i tried inserting the script into the functions.php but it came up with an error page. would appreciate if you could tell me were to paste this script. woo theme has the following php files.
404 Template (404.php)
Archives (archive.php)
Comments (comments.php)
Footer (footer.php)
Header (header.php)
Main Index Template (index.php)
Page Template (page.php)
Search Results (search.php)
Sidebar (sidebar.php)
Single Post (single.php)
Theme Functions (functions.php)
Video Attachment Template (video.php)
admin-custom.php (admin-custom.php)
admin-functions.php (admin-functions.php)
admin-interface.php (admin-interface.php)
admin-setup.php (admin-setup.php)
admin-theme-page.php (admin-theme-page.php)
ads-300×250.php (ads-300×250.php)
ads-bottom.php (ads-bottom.php)
ads-management.php (ads-management.php)
ads-top.php (ads-top.php)
archives.php (archives.php)
block_ads.php (block_ads.php)
blog.php (blog.php)
comments-legacy.php (comments-legacy.php)
custom.php (custom.php)
default.php (default.php)
easytube.php (easytube.php)
featured.php (featured.php)
home.php (home.php)
imagegallery.php (imagegallery.php)
mpu_ad.php (mpu_ad.php)
pagenavi.php (pagenavi.php)
popular.php (popular.php)
sidebar-init.php (sidebar-init.php)
sitemap.php (sitemap.php)
stylesheet.php (stylesheet.php)
tag.php (tag.php)
template-imagegallery.php (template-imagegallery.php)
test.php (test.php)
theme-comments.php (theme-comments.php)
theme-functions.php (theme-functions.php)
theme-js.php (theme-js.php)
theme-options.php (theme-options.php)
theme-widgets.php (theme-widgets.php)
thumb.php (thumb.php)
top_ad.php (top_ad.php)
version.php (version.php)
Styles
Stylesheet (style.css)
slideshow.css (slideshow.css)
Please help, i am a novice