开发者

For a user who is not logged into Facebook, the like button gives an error in the pop up window (non-iframe method)

开发者 https://www.devze.com 2022-12-31 21:10 出处:网络
In order to make full use the Face开发者_如何学运维book like button, I am trying to switching from iframe-based like button to js-based like button.

In order to make full use the Face开发者_如何学运维book like button, I am trying to switching from iframe-based like button to js-based like button.

url: http://www.dealsvista.com

Everything works fine for a user who is logged into Facebook.

However, for a user who is not logged into Facebook, when he clicks the like button, there is a error in the popup window.

Could someone point me to the right direction? I am really new to Facebook api and have no idea what is going on?

Do I have to implement connect at the same time?

Do I have to set up the connect call back url in my apps?


It could really help if you could post some of your code. It sounds like the popup you're getting is attempting to give users the option to login but isn't being passed the correct details to do so.

So as a starting point, it's important when implementing the JS SDK that you initialise your code correctly. StackOverflow is preventing me from posting too many links so for this one, go to the Facebook Developers home page, click Documentation, SDK's and Tools and then Javascript SDK. That page will tell you exactly how to initialise the JS SDK.

Once you've done that, ensure your page has the correct Open Graph Protocol tags and html declaration: http://developers.facebook.com/docs/opengraph/

It should then be as simple as adding the correct social plugin code to your page:

<fb:like href="yourdomain.com" send="true" width="450" show_faces="true" font=""></fb:like>

Facebook will help you configure the various available settings for the Like button here: http://developers.facebook.com/docs/reference/plugins/like/

Enter your domain, configure the rest and when you submit the data, Facebook will give you the code you need. WARNING: if you've initialised the JS SDK as mentioned above, the only part of the code you will need is the fb:like tag - the rest of the code Facebook give you assumes you have not initialised the JS SDK.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号