Windows Phone Facebook app not returning access token after V 8.3.1.0 Update

前提是你 提交于 2019-12-23 04:53:39

问题


I allow my windows phone app users to login using their Facebook account. To authenticate the user and get the access token, I follow the steps provided in this link. It opens up the installed Facebook app on windows phone, authenticates the user and returns an access token. This was working until Facebook recevied V 8.3.1.0 update. Now it opens up the facebook app and comes back with following error:

/Protocol?encodedLaunchUri=msft-<my_app_id>://authorize?error=&error_code=2005&error_description=Calling+app's+ID+doesn't+match+the+ID+sent+by+the+calling+app&error_reason=Calling+app's+ID+doesn't+match+the+ID+sent+by+the+calling+app&state="

What went wrong here? Any deep link changes by facebook?


回答1:


Found a solution.

When we create a Windows Phone project in Visual Studio, it would assign a Product Id to our app. That Id will change once the app is published on the store.

When we define custom Uri scheme in WMAppManifest.xml file, we have to always specify the published app id. Otherwise facebook authentication would fail.

This new facebook app is expecting the calling app's product id to be same as published app id that is mentioned in the custom uri scheme. Since it won't match in our local app, it is returning the error stated above. I changed the Product id to published app id and everything works fine.

This might help if someone is facing similar issue.



来源:https://stackoverflow.com/questions/25190652/windows-phone-facebook-app-not-returning-access-token-after-v-8-3-1-0-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!