Is there any way to make PHP SDK for Facebook and Javascript SDK

I use the PHP SDK for several backend functions that integrate Facebook, and I use the Javascript SDK to do things like embed widgets (like Like buttons, etc.).

Is there a way to make them communicate with each other? For example, if my users access my site using a social login (which uses the PHP SDK), I can record this information using JS materials, allowing them to interact with the Graph API.

Perhaps there is a way to include user token in JS embed code so that it knows?

I can't seem to find anything to discuss this.

+3
source share
2 answers

JS SDK , cookie facebook. PHP sdk,

FB.init({appId: 'your app id', status: true, cookie: true,
             xfbml: true});

cookie true, cookie , PHP sdk.

0

( 2011) Facebook PHP JS-, OAuth 2.0. . https://developers.facebook.com/blog/post/525/ http://developers.facebook.com/blog/post/534/.

OAuth 2.0 session FB.init js sdk. , (1 2011 - OAuth 2.0).

cookie oauth true FB.init js, fbsr_APPID ( APPID - ). cookie .

, PHP, , Facebook .

:

  • .
  • fbsr_APPID cookie
  • JS SDK cookie oauth true FB.init
+2

All Articles