I have my app used as a tab on a page implemented using iframe. I'm iterating over some links and for each link I'd like to add a Like button, but none of the generated buttons work becaus开发者_如何学运维e of some restrictions.
The closest I've got, with their APIs is FBJS's Facebook.streamPublish, but that's not exactly equal to Like.
Should I switch my application to FBML so that the XFBML Like button would work, or would it?
I'm really frustrated with Facebook's developer documentation, especially for the tabs. They seem to be forced to use the soon to be deprecated APIs, since I couldn't get the new Javascript SDK working at all.
The tag you want is <fb:like-box>
1. Are you trying to accomplish this in a tab or a canvas page? If it's a tab, know that FB goes out of their way to prevent developers from putting Like buttons on Page tabs, so you should reconsider that approach. Know that the iframe version of <fb:like-box>
does not work in the tab, since you cannot use iframes there right now. (There is a scheduled Q1 migration of tabs toward iframes)
If you're on a canvas page, the Like box should just work. Make sure that the Facebook SDK is (a) loaded and (b) initialized.
精彩评论