Windows Phone Facebook应用程序在V 8.3.1.0更新后不返回访问令牌 [英] Windows Phone Facebook app not returning access token after V 8.3.1.0 Update

查看:106
本文介绍了Windows Phone Facebook应用程序在V 8.3.1.0更新后不返回访问令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我允许我的Windows Phone应用程序用户使用他们的Facebook帐户登录。要验证用户并获取访问令牌,请遵循此链接中提供的步骤。它打开Windows手机上安装的Facebook应用程序,验证用户并返回访问令牌。这是工作,直到Facebook收到V 8.3.1.0更新。现在它打开了Facebook应用程序,并返回以下错误:


/协议?encodedLaunchUri = msft-< my_app_id >://授权错误=&放大器; ERROR_CODE = 2005&放大器; ERROR_DESCRIPTION =主叫+应用程序的+编号+不+匹配+在+ ID +由+在+调用+应用程序和放发+; ERROR_REASON =致电+应用程序的? + ID +不+匹配+ + ID +发送+由+呼叫+应用&状态=


什么在这里出现错误?通过Facebook的任何深层链接更改?

解决方案

找到一个解决方案。



当我们在Visual Studio中创建一个Windows Phone项目时,它将为我们的应用程序分配一个产品标识符,一旦应用程序在商店上发布,该Id就会更改。



当我们在WMAppManifest.xml文件中定义自定义Uri方案时,我们必须始终指定已发布的应用程序ID,否则Facebook身份验证将失败。



应用程序期望呼叫应用程序的产品ID与publ相同在自定义uri方案中提到的ished应用程序ID。由于它在本地应用程序中不匹配,所以返回上面提到的错误。我将产品编号更改为已发布的应用程序ID,一切正常。



如果有人面临类似问题,这可能会有帮助。


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?

解决方案

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.

这篇关于Windows Phone Facebook应用程序在V 8.3.1.0更新后不返回访问令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆