UserID is returned as 0 and Token has the 3rd part missing for a Canvas Facebook Application!
Do you know what could cause this as a return for a Facebook Canvas app. It works for most users of our site but some users, it generates this and i cant figure out what would cause开发者_高级运维 this. The userID is returned as 0 and the Token seems to be missing something. there is no other way for the users to reach the site other than visiting the Facebook App page... Please let me know what i can do to prevent this from happening
UserID: 0
Token: 104743107829|b8bbc20eac6127d8a9a85451490a0663
Quesrty String:signed_request=W13Y8eiSHTyyqBnyJjll8WngPFeQqabhVBkJaHnXYb4.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTI5NDU5NjIwMywidXNlciI6eyJsb2NhbGUiOiJpdF9JVCIsImNvdW50cnkiOiJpdCJ9fQ
I don't know why this happens, so maybe this isn't a proper answer to your question, but I do have a couple of ideas you can try:
Get the latest changeset including the resolution to this work item: http://facebooksdk.codeplex.com/workitem/5789 and try to instantiate a new FacebookApp object using the token to get the userid.
Edit the source to FacebookApp.cs to make FacebookApp.ParseSignedRequest a public method and use it to decrypt and parse the signed request to get the userid (see this active work item: http://facebooksdk.codeplex.com/workitem/5789 )
精彩评论