开发者

Connect With Facebook Question

i have a Connect With Facebook button for my main site. Then, I also create a smaller site for Facebook App and Facebook Page Tab (? I don't know what it's called), but the smaller site is created with Page Tab in mind ( width 520px ). All of them of course have a Connect With Facebook button.

My question is, how to check if the user connect with facebook from the main site or from a Facebook App or Page Tab? FYI, my smaller site is on a folder inside the mainsite, which I route with Virtual host, so the url for my mainsite is for example domain.com, and the smaller site fb.domain.com.

I've checked the Facebook App and Page Tab, and everything work开发者_Go百科s perfectly as in the main site, the only thing that's strange is when people connect with facebook from Facebook App or Page Tab, they get redirected to fb.domain.com, because that's what I put in the Canvas URL of the Facebook App.

Of course, I can route the fb.domain.com to redirect to the Facebook App, but I don't want that, and even if I route it, the problem is still the same, how can I check if they Connect With FB from a Page Tab or from the FB App ?

I hope I'm being clear, as I'm new to this Connect With FB thing


https://developers.facebook.com/docs/guides/canvas/#tabs has a section which outlines how to do what you want.

When a user navigates to the Facebook Page, they will see your Page Tab added in the next available tab position. Broadly, a Page Tab is loaded in exactly the same way as a Canvas Page. When a user selects your Page Tab, you will received the signed_request parameter with one additional parameter, page. This parameter contains a JSON object with an id (the page id of the current page), admin (if the user is a admin of the page), and liked (if the user has liked the page). As with a Canvas Page, you will not receive all the user information accessible to your app in the signed_request until the user authorizes your app.

The section on signed requests will also be helpful in understanding how this works.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜