Showing posts with label Facebook. Show all posts
Showing posts with label Facebook. Show all posts

24 March 2012

Integrate Facebook Comments for Blogger Tutorial

Display Facebook comments on your blog and let Facebook users comment on your blog without signing up for Blogger or other services.

This tutorial assumes that you have a Facebook account and a Blogger account with a blog.

1. First you need to create a Facebook App for your blog. In order to do this go to https://developers.facebook.com/apps 

2. In the top right of your screen click on the "+ Create New App" button as shown in the screen shot below:
3. You will be presented with the screen below in which you need to choose:
  • A name for your app which can be anything you like; I have chosen "JT Blog Comments"
  • A namespace for your app this can be anything you like as well but it must be in all lower case letters without any spaces. Don't worry about what these attributes do, but just know that they are necessary for any Facebook App.
  • Do NOT tick the web hosting option. This is not necessary for our comment application.
Once you have entered all the details click "Continue"

4. You will then be asked to pass the "captcha" test. i.e. type in the letters in the image in order for Facebook to verify that you are a human and not a spamming computer program. Enter the correct letters or numbers the click "Submit".

4.a) If you have not setup your Facebook account with a mobile phone number you will see the message below. If you don't see the message below skip to step 5 (that means you have already setup your account with a mobile telephone). For those of you - such as myself - who come across this message, click on the link in the red box which says "mobile phone".


4.b) You will then see the screen below;

  • Select your country
  • Enter your mobile phone number
  • Then click the "Confirm" button



4.c) You will be taken to the page below and at the same time receive a text message(SMS) on your mobile phone. Enter the code from the SMS you received on your mobile phone in the box and click "Confirm"


4.d) You will then see a success message as shown below stating that your account has been verified. Close this page and go back to where you left off when you came across the popup at step (4.a).


4.e) Follow instructions in step 3 again.

4.f) Follow only the first part of step 4 which is only entering the skewed text displayed in the image. Then jump to step 5.

5. You will see the page displayed below;

  • Make a note of your App ID or copy it
  • Where is says "App Domain" enter "blogspot.com". (If you host your blog on your own domain name then enter your domain name here)
  • In the "Website" section where it says "Site URL" enter the address of your blog e.g. "http://bloggerpost3.blogspot.com"
  • Click "Save Changes"


6. After saving the changes to your Facebook app, you will see a confirmation message in a yellow box at the top of the webpage.

Now your Facebook App is ready. Just make a copy of the App ID as you will need this number when integrating the Facebook comment application into your blog.

7. Change the code below by replacing FACEBOOK-APP-ID with your Facebook App ID number which  you copied at step 5.
<meta content="FACEBOOK-APP-ID" property="fb:app_id" />
So my modified code looks like this: 
<meta content="336995009681830" property="fb:app_id" />
8. Go to your blog dashboard on Blogger.com; Select "Template" then click on "Edit HTML" as highlighted in the screenshot below:


9. You will receive a popup with a few options. Click on the "Proceed" button as shown below:


10. You will then see the code in your template. Try to locate the <head> tag as shown in the screen below:


11. Just below the <head> tag paste your modified code from step 7. Here is how my code looked like after this change:

12. Click "Save Template"

13. Now you need to add some more code to your template (this is the actual code for the Facebook comment section below your blog posts). Go to you blogger dashboard for your blog then select "Template" > "Edit HTML" > "Proceed" to view your HTML code (i.e. follow steps 8 and 9)


Update 21/04/2013: Since 11th of April 2013 step 14 is no longer necessary. This check-box has been removed and instead each widget can be expanded using an arrow to the left of it. Also there is a drop down menu at the top of the editor which allows you to select the widget that you want to scroll to in one click.
14. Tick the "Expand Widget Templates" checkbox as shown below:

15. Find the code below in your template code using Ctrl-F shortcut and paste the code into the search box.  Warning: Do NOT try to type the text below as your web browser could freeze.
<div class='post-footer-line post-footer-line-3'>
The screenshot below shows how it would look:

If you were able to find the tag that you searched for jump to step 16.

15.a) Depending on the blogger template that you are using it is possible that the above search fails. In that case search for this tag:
<p class='post-footer-line post-footer-line-3'> 
15.b) if the search at step 15.a failed then search for the following tag:
<data:post.body/>
16. Paste the code below immediately after the tag you found at step 15(or 15.a xor 15.b)
<b:if cond='data:blog.pageType == "item"'> <div id="fb-root"></div> <script>(function(d){ var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; d.getElementsByTagName('head')[0].appendChild(js); }(document));</script> <fb:comments width='450' colorscheme='light' expr:title='data:post.title' expr:href='data:post.canonicalUrl' expr:xid='data:post.id'/> </b:if>
So the resulting code would look like this:
Optional: To change the width of your comment box in the code above change width="450" to whatever you see suitable for your blog.

Optional: To change the color scheme of your comment box you can change the word "light" to "dark" for the attribute colorscheme='light' which gives you the two coloring schemes available for Facebook comment boxes.

17. You now need to add the Facebook Namespace declaration in your code. If you go the top of your code you will see a tag as <html as shown below:


You need to add the code below right after the <html tag
xmlns:fb="https://www.facebook.com/2008/fbml"
So it would look like this instead: 
<html xmlns:fb="https://www.facebook.com/2008/fbml"
Here is a screen shot of the code after the change:
Note: The namespace added in the code above is used for all Facebook widgets and apps. So you only need to add this into your code once, regardless of how many different FBML widgets you use.

18. Click "Save Template"

19. Click "Close"

20. Enjoy!


Moderating comments, Administration options and housekeeping
Visit this URL http://developers.facebook.com/tools/comments in order to view all the posted comments on your blog. This is the screen you will see:


If you click the "Settings" link on the above page you will be presented with a few options that are self explanatory such as adding Moderators for your blog or allowing users with different logins to leave comments(e.g. Yahoo or Hotmail logins). Here is a screenshot of the settings page:

Removing Blogger Comments
Although I would not recommend to anyone that they remove blogger's default commenting feature, if you choose to do so you can easily hide or show it from your blogs dashboard by going to

  1. Settings 
  2. Posts and comments 
  3. Comment Location then select "Hide"
  4. Make sure to click "Save Settings"


If the screenshots are too small to read, you can click on them to enlarge them.

If you run into any problems, let me know in the comments' sectio.



UPDATE (17/01/2013)

Adding a Facebook Comment Section For Stand Alone Pages on Blogger

If you have a stand alone page then the above procedure for adding Facebook comments will not work as the above approach only applies for blog posts and not "pages". So in order to obtain the Facebook comment section on stand alone pages you need to follow the steps below in addition to the above steps. (Note that the steps below need to be repeated for every single page whereas the above guide which only includes blog posts will cover all your blog posts. Note 2; blog posts and blog pages are two different things)

1. Go to your page then select "Edit" as shown in the screen shot below:

2. Once you go through to the edit page, look at the URL in the address bar at the top of your browser. You will see an address similar to this:

http://www.blogger.com/blogger.g?blogID=363170316363135703#editor/target=page;pageID=1979633926023450196

3. Make a note of the last number from the URL address. (This will be unique to your own page so don't copy the number I have shown here.) In my example the number is 1979633926023450196.

4. Click on the "HTML" tab as shown on the screen shot below:

5. Now you will see the HTML code behind your page. Go to the bottom of this code and "Cope & Paste" the following text:

<div id="fb-root">
</div>
<script>(function(d){ var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; d.getElementsByTagName('head')[0].appendChild(js); }(document));</script> <fb:comments colorscheme="light" href="http://bloggerpost3.blogspot.com/p/jenson.html" title="Blog" width="450" xid="1979633926023450196"></fb:comments>

6. The above code is an example used for one my blog pages so you have to change 3 parts that are highlighted (in red) in the above code to suit your own blog page.
6.a. The URL of your blog page. (In my example it's http://bloggerpost3.blogspot.com/p/jenson.html)
6.b. The title of your page. (In my example it's Blog)
6.c. The page id of your page. This is the number that you made note of in step 3. (In my example it's 1979633926023450196)

7. After you have entered the code in your page it should look like the below screen shot so just press update and your page should be ready for facebook comments.


If the screenshots are too small to read, you can click on them to enlarge them.

If you run into any problems, let me know in the Facebook comments' section ;)


20 March 2012

How to make a fan an Admin on a Facebook Fan Page that is not on your friend list and you don't have their email adress


This is a question I had but couldn't find an answer on Google so I decided to find the solution and post a blog about it:

How can I make a fan(member) of a Facebook fan page, an administrator on Facebook without having them on my friend list and without knowing their email address? 
The URL below can be used to view all members of a fan page. This URL is not presented anywhere obvious on fan pages any longer but it's one that becomes visible when notifications of new "likes" are presented on your fan page.

http://www.facebook.com/browse/page_fans/?page_id=329814337062047

The number you see in the above address is a unique ID for each fan page, so you need to find this unique number for your own fan page. So to find out what the ID of your fan page is, go to your Facebook fan page then click the "Edit Page" button(this button will only be visible if you are an administrator of that page). Now look in the URL and you will see something like:

https://www.facebook.com/pages/edit/?id=329814337062047

The number in the above URL (use your fan page's number number) is what you need to copy and paste into the URL below to view all members of a fan page:


So all you have to do is replace the number which is presented in front of "page_id=" with that of your own fan page. Now press "Enter" and you will see a list of all members with a "Make Admin" button next to each name. Pressing this button will take you to a new page and ask for your password. Once you enter your password and press "ok", the new admin will be visible.


Make someone a Facebook Fan Page Admin with Email Address
To make someone an admin on a facebook fan page, if you have their email address you can enter their email address after browsing to "Edit Page" > "Manage Admins" and pressing save to make the changes permanent. (You will be asked for your password for security reasons)

Make someone a Facebook Fan Page Admin if they are your friend
The third approach is if the person is on your friend list, in which case you browse to "Edit Page" > "Manage Admins" and type in their name. You will see their profile name and photo popup. So you can select the user then press "Save" to make the changes permanent. (You will be asked for your password for security reasons)

11 February 2012

Selective posting to Twitter and Facebook from Google+

I previously wrote two blog entries about posting Google+ messages to Facebook and Twitter:



If you follow the second approach which only works for public posts. You can limit what is posted to your Twitter feed using a text similar to a hashtag. All you have to do is to include the word Twitter in your Google+ post for messages to be posted to your Twitter. I will explain how this is done.

Go to your previously setup feed on http://feedburner.google.com and change the settings on your feed to look like the screen shot below:




As you can see there are two differences between the settings in the above screen and the settings applies in the previous tutorial.

1. As the red arrow in the above image indicates you must enter the text Twitter or a unique text that you will add to your Google+ messages that you want to be posted to your Twitter account. Also note the drop down menu below the arrow should have the following option selected: "the title". Once these settings are saved the job is finished and you're read to go.

2. The second difference only applies for selective posting to Facebook. If you have followed my earlier tutorial but decide that not all your posts from Twitter should go to your Facebook wall remove the #fb that we had previously placed in the "additional text" text box. So now, if you want your Google+ posts that are submitted to Twitter to be also posted on Facebook you should include the word #fb in your Google+ post. Assuming you're currently using the "Selective Tweets" app on Facebook.

So now to automatically post something from Google+ to Twitter include the text Twitter and if you want to post it to Facebook as well as Twitter include the text: Twitter #fb

Note 1: This approach will only let you post to Facebook if you're posting it to Twitter as well.
Note 2: Since we are now including the #fb text in our Google+ post it must be towards the beginning of the message so that Twitter does not cut it off due to its limited message size.
Note 3: Since the #fb text is no longer appended to the end of our message you must go to facebook and change the setting in your "Selective Twitter" app on Facebook. Tick the checkbox which reads "Allow the #fb tag anywhere in the tweet?" as shown on the screen shot below:



I admit my solutions are always cumbersome and super geeky but they do work. If you have any questions don't hesitate to ask me on Google+, or Facebook, or Twitter. Also please subscribe to my blog via email or RSS feed

21 July 2011

Automatically publish your Google+ Plus "Public" posts to Twitter (and Facebook)

How to post your Public Google Plus posts to Twitter (and Facebook)

This technique will only work for *Public* posts.
  1. Copy this URL but replace the ending number with your own Google Plus account number http://plusfeed.appspot.com/106166623138751182431
  2. Go to http://feedburner.google.com and sign in with your Google account.
  3. Paste the above URL in the area which says "Burn a feed right this instant." Here is a screenshot: 
  4. Click "Next" and you will see this screen:
  5. On the above screen click "Next" which will take you to the below screen:
  6. Click "Next" on the above screen and you will be presented with the following screen:
  7. Click "Next" on the above page, which will take you to this screen:
  8. On the above page click the "Publicize" tab
  9. Then click the "Socialize" link from the left hand side links
  10. Click the button which says "Add a Twitter account". Assuming you are logged in on Twitter confirm the authorization page presented by Twitter.
  11. On the "Socialize" adjust your settings as shown on the screen shot below:
  12. Click the "Activate" button at the bottom of the page. From now on all your "Public" messages on Google plus will be posted to Twitter. The message that is posted on twitter will include the beggining of your post with a link to your message on your Google+ profile. So hopefully your Twitter followers will gradually migrate to Google Plus. Note, there will be a delay from your messages being posted on Google Plus to them appearing on Twitter.
  13. To reduce the delay between posting something on Google Plus and it appearing on Twitter click on "PingShot" link on the left hand side, which will take you to the below page:
  14. Then click "Activate" to enable this feature, (above screen shot)
The automatic Twitter posting is now complete and ready to go, and all tweets will include a link to your message posted on Google Plus.

For those of you who want these messages to automatically post to Facebook as well, there are many options available to synchronize the two. I will mention two methods:

Method 1: If you're looking to automatically post all your Twitter updates straight to Facebook, the Twitter application (by Twitter) is the best option. It's really simple to use; just install the application and then click to allow Twitter to update your Facebook status.

Method 2: However I prefer that only some of my tweets to be automatically posted to my Facebook wall so I use an applications called Selective Tweet Status. This application will only post tweets that end in #fb to your Facebook profile. Once you go to this application's page, enter your Twitter username and click save. So for our automatic tweets that are generated from Google+ we need to add the three characters #fb to the end of our tweets. To do this:
  1. Go to http://feedburner.google.com
  2. Click on the appropriate link for your Google+ link. e.g.
  3. Click on the "Publicize" tab
  4. Click on "Socialize" from the left hand side links
  5. Enter #fb in the "Additional text" section. like the screen shot below:
  6. Make sure the drop down menu below it is set to "end of the post"
  7. Click the "Save" button at the bottom of the page.
  8. Enjoy! (Usually your updates will appear on Facebook within 2 minutes of them being posted on Twitter, however sometimes when Twitter is having difficulties (fail whale..) it can take quite a bit longer.)
Problems:
If your tweets do not appear on your Facebook status it could be because your tweets are set to private or due to spamming type behaviour Twitter has stopped your tweets from appearing in search. The selective tweets application uses Twitter search mechanism to locate the tweets that are destined for Facebook. For more info see http://apps.facebook.com/selectivetwitter/help


Recommendation:
The major "Plus" of this method is that posts made on Google+ are automatically posted to both Facebook and Twitter with a link back to your Google+ post. So Google+ remains your main communication head quarters while Twitter and Facebook just act as mediums for letting people who are not yet on Google+ what's happening. So the people on Facebook and Twitter will get the information but with a delay. You can read the instruction on link below to get your Google+ posts to instantly post to Facebook, however messages longer than 47 characters will be chopped and there will be no link back to your Google+ post on Facebook. 
http://jensontaylor.blogspot.com/2011/07/automatically-publish-your-google-plus.html

I have enabled both approaches on my profile, i.e. the nice but delayed approach described here as well as the instant but limited approach described in the above link. So my Facebook page shows each message twice. Once it displays a chopped message and then after a delay a more complete message is posted. The way I view Google+ is my updates' center. The fact that my posts are spammed shared on other social networks is just a bonus. If people reply to my posts on other social networks I will receive their messages on my mobile phone so I will still interact with users from other social networks but the interaction will be more one way in the sense that I respond to people who have interacted with me explicitly as opposed to me commenting on their photos or wall posts or reacting to someone's tweets, because I will not spend much time on those networks, now that Google+ does a better job for my needs.

Personally I don't like the approaches that I have suggested at all because it relies on too many unreliable services and the slow updates, however so far it has worked perfectly for me. Google has indicated that they will provide xml/rss feed for Google+ so once that feature is available we can cut out the third party website. I will update you on this as soon as it becomes available.

P.S. Don't forget to subscribe to this blog via email or feed

20 July 2011

Automatically publish your Google+ Plus posts to Facebook

Updating your Facebook status via Google Plus+

  1. Access Facebook
  2. Go to http://facebook.com/mobile
  3. Copy your email address unique (underneath where it says "Upload via Email")
  4. Go to the circle's page on Google+ and create a circle called "Facebook Status"
  5. Add the e-mail from Facebook in your new circle(Facebook Status)
  6. When you want to publish something on Facebook, simply add the circle.(and don't forget to tick the checkbox which says "Also email 1 person not yet using Google+ yet")
  • Photos are not uploaded on Facebook
  • Works with public posts as well (As long as you include the "Facebook Status" circle)
  • Your posts on Facebook will take the default permission("Everyone" or "Friends of Friends" or "Friends Only")
  • UPDATE: If the message is longer than 47 characters you will see the first 44 characters followed by three dots in your Facebook status. (I have informed Google+ of this problem and I hope they will solve it)