Get Facebook Fan Page-id In Page Tab App Using Javascript
Solution 1:
No, you can not.
The page info is send only in the signed_request that gets POSTed to your app so with JavaScript, you have no access to POST data. But you can easily access with server side language.
You might found a lots of PHP code for it..for C# you can use below code..
string signedR = Request["signed_request"];
I hope this might be helpful to you...@Mirant
Solution 2:
Can I get Facebook fan page-id in page tab app […] using javascript?
No, you can not.
The page info is send only in the signed_request
that gets POSTed to your app on initial load into the iframe – and with JavaScript, you have no access to POST data.
The signed_request
you get from the JavaScript SDK is a “different one”, it contains info about the auth status and user only, not about the page.
I want to add Page tab app similar to Pinterest Page App, which initially get UserId/UserName and after that if we open that app then it will directly open according to inserted UserId/UserName.
I don’t understand what you mean by that exactly. And I don’t see what this has to do with the page id, when you are only speaking of the user id/user name here?
Post a Comment for "Get Facebook Fan Page-id In Page Tab App Using Javascript"