I use the PHP SDK for several backend functions that integrate Facebook, and I use the Javascript SDK to do things like embed widgets (eg: Like buttons etc).
Is there a technique to get them to communicate with each other? Eg, if my users login using my sites social login (which uses the PHP SDK) can I log that info with the JS stuff allowing them to interact with the Graph API.
Perhaps there is a way of including the users token in the JS embed code so that it is aware?
I can’t seem to find anything that discusses this.
If you use the JS SDK to login you can configure it to create the facebook cookie. You can then extract the token from that and use it in the PHP sdk, as covered here
If you set
cookieto true, you’ll get a cookie on the server side with a token you can pass into the PHP sdk.