How to get SEO credit for Facebook Comments (the missing manual)

Updated on Sunday, September 30, 2018

How to get SEO credit for Facebook Comments (the missing manual)

I've been using the Facebook Comments Box on this blog since I parted ways with Disqus. One issue with the Facebook system is that you won't get SEO credit for comments displayed in an iframe. They have an API to retrieve comments but the documentation is pretty light and so here are three critical tips to get it working.

The first thing to know is that comments can be nested. Once you've got a list of comments to enumerate through you need to check each comment to see if it has it's own list of comments and so on. This is pretty easy to handle.

The second thing is that the first page of JSON returned from the API is totally different from the other pages. This is crazy and can bite you if you don't test it thoroughly. For https://developers.facebook.com/docs/reference/plugins/comments/ the first page is https://graph.facebook.com/comments/?ids=https://developers.facebook.com/docs/reference/plugins/comments/. The second page is embedded at the bottom of the first page and is currently https://graph.facebook.com/10150360250580608/comments?limit=25&offset=25&__after_id=10150360250580608_28167854 (if that link is broken check the first page for a new one). The path to the comment list is "https://developers.facebook.com/docs/reference/plugins/comments/" -> "comments" -> "data" on the first page and just "data" on the second. So you need to handle both formats as well as the URL being included as the root object on the first page. Don't know why this would be the case, just need to handle it.

Last but not least you want to include the comments in a way that can be indexed by search engines but not visible to regular site visitors. I've found that including the SEO list in the tag does the trick, i.e.

I've included the source code for an ASP.NET user control below - this is the code I'm using on the blog. You can see an example of the output on any page with Facebook comments. The code uses Json.net.

FacebookComments.ascx:

FacebookComments.ascx.cs

Add your comment...

Related Posts

You Might Also Like

(All Marketing Posts)

Skype for Android 4 - Better but Useless

Updated on Saturday, October 1, 2022

Skype just released a completely rewritten version of their Android client.

It's a nice streamlined UI and for the first time on Android it actually loads the 15,422 chats I'm required to participate in work and is usable and responsive. I've used it for a few days and really want to like it.

But.

Even though it's faster and prettier it still destroys battery life. Imo.im ad Plus.im manage to handle multiple networks all day without putting a noticeable dent int the battery. With Skype up and running my phone is dead by the early evening. It's useless.

They also haven't fixed syncing the read state of messages which is the worst deficiency of Skype on both mobile and the desktop. Imo.im did this wonderfully until Skype cut them off at the kneecaps.

Back to Plus.im for now...

Add your comment...

Related Posts

You Might Also Like

(All Marketing Posts)

Leafhopper Nymph

Updated on Sunday, May 9, 2021

Leafhopper Nymph

I spotted this odd looking bug in my porch a few weeks ago. It looks like a wingless fly with a hairy tail that wouldn't look out of place on a fly sized horse.

My Google-fu failed me so I turned to JustAnswer. Random insect identification isn't your typical veterinary question but Rebeccavet came through for me via a taxonomist in Kenya and told me it's a Leafhopper (Cicadellidae) nymph. Given this information Google Images confirmed that this seems like the most likely possibility.

(Full disclosure - I work at JustAnswer.)

Add your comment...

Related Posts

You Might Also Like

(Recent Photos)

Catfood Earth for Android 1.20

Updated on Monday, May 31, 2021

Catfood Earth for Android 1.20

I recently upgraded to the HTC One which has a transparent notification bar. This makes it hard to see notification icons when using Catfood Earth as your wallpaper, at least in the summer when it's always light at high latitudes and your white icons are displayed on top of polar ice and clouds.

Catfood Earth for Android 1.20 fixes this with an option to paint black under the notification bar. That's the only update other than the latest Xamarin runtime.

Add your comment...

Related Posts

You Might Also Like

(All Code Posts)

Pride

Updated on Sunday, May 3, 2020

Pride

Updated 2013-06-30 19:51:

Pride

Updated 2013-06-30 20:37:

Pride

Updated 2013-07-01 00:31:

Pride

Updated 2013-07-01 08:37:

Pride

Add your comment...

Related Posts

You Might Also Like

(Recent Photos)

Commute

Updated on Saturday, September 18, 2021

View of Alcatraz from Steiner and Pacific in San Francisco

View to Alcatraz from Steiner and Pacific - about to cycle down very fast.

Updated 2016-04-26 21:42:

Ecology Trial in The Presidio of San Francisco

View from the Ecology Trail in The Presidio of San Francisco.

(Previously: Commute failing to suck this morning...)

Add your comment...

Related Posts

You Might Also Like

(Recent Photos)

Free

Updated on Thursday, November 12, 2015

Free

Free Firewood... and Tibet

Sign seen in Bernal Heights, San Francisco.

Add your comment...

Related Posts

You Might Also Like

(Recent Photos)

Summer Solstice 2013

Updated on Thursday, November 12, 2015

Summer Solstice 2013

Summer Solstice 2013 in Catfood Earth. (summer starts now in the Northern Hemisphere, Autumn if you are south of the Equator.)

Add your comment...

Related Posts

You Might Also Like

(All Code Posts)

Signs

Updated on Sunday, May 3, 2020

Signs

Updated 2013-06-30 20:01:

Signs

Updated 2013-07-06 19:00:

Be the person your dog thinks you are

Updated 2013-11-05 14:38:

remember remember

Updated 2013-11-06 12:56:

Mission Love

[more]

Updated 2015-05-01 18:38:

Open Hole

Add your comment...

Related Posts

You Might Also Like

(Recent Photos)

This week in defeating Patent Trolls

Updated on Sunday, October 23, 2022