My notes on this with the new view.pageheader.html tag in 7.85:
First problem, is that FB wants your opening html tag to have some extra crap in it:
html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml"
To do that I used some code posted in the DNN forum - see this post:
http://www.dotnetnuke.com/Resources/Forums/forumid/108/postid/399761/scope/posts.aspx
I added the VB code to the top of my skin file and it works great.
Next, i added in the og: tags that are specified on:
http://developers.facebook.com/docs/opengraph/
I added those to the view.pageheaders.html template. Here is what they looked like for
me: meta property="og:image" content="http://ephotopros.com/Portals/0/fb-e.png"
meta property="fb:app_id" content="215131801851977"
meta property="og:site_name" content="ePhotoPros.com"
meta property="og:title" content="[TITLE]"
meta property="og:type" content="article"
meta property="og:url" content="[ARTICLELINK]"
meta property="og:description" content="[SUMMARY:150]"
I have left off the opening and closing tags as the forum no likey. URL has to be the url of the page you are on - not the root of the site. When users click the recommend button, they are sharing this url, not liking my sites page on FB.
Then I added the xfbml like button code you can get from here:
http://developers.facebook.com/docs/reference/plugins/like/
I turned off show faces and changed like to recommend. I added this to the view.item template with ARTICLELINK as the href.
Then check your work using the FB Linter at:
http://developers.facebook.com/tools/lint
I get mixed results on the linter - any new url i stick in works, but older ones seem to not get updates.
I also added in the FB comments - which was pretty easy - just stuck that in the view.item template also.
Check it out here - one of our videos:(and leave a comment or like it!)
http://ephotopros.com/training/video-archive/id/308/photoshop-screenshot-help-videos-thing.aspx
PS the google plus 1 requires a line of script - that is added to the pageheader.html file as well. Twitter stuff is just in the view.item template.
Oh yeah - my site was fully valid for xhtml transitional - now with the facebook stuff it is not. For the FB og: tags that are required to be in the header to validate, the site must be xhtml 1.1 strict. I tried that and there were a whole bunch of new problems, so I am keeping it as transitional for now. No idea what it even matters as most sites do not validate anyways. If google doesn't, I feel like I should be ok too. |