我目前在 xamarin 表单中使用 Xamarin.Social 组件,当我尝试发布到 Facebook 时,它给我一个错误说明:共享错误:远程服务器返回错误:(403)禁止“,任何人都知道我为什么会得到这个错误以及如何解决它?Twitter 发布也非常好,所以它只是 Facebook。
谢谢你
我目前在 xamarin 表单中使用 Xamarin.Social 组件,当我尝试发布到 Facebook 时,它给我一个错误说明:共享错误:远程服务器返回错误:(403)禁止“,任何人都知道我为什么会得到这个错误以及如何解决它?Twitter 发布也非常好,所以它只是 Facebook。
谢谢你
some Troubleshooting for your issue:
You probably already have your ClientID correctly set up. Check it again on https://developers.facebook.com/apps
It took me a while to figure out what to enter as for the RedirectURL. At the moment i am using https://apps.facebook.com/yourappname/. If this is not working for you, go to your App on Facebook Developers Page > Settings > Add Platform > Facebook Canvas > And enter this url as for the "Canvas Page". Authentication should work fine now, and the 403 error should no longer occur.
My working example, for creating the Facebook service:
public static FacebookService Facebook
{
get
{
if (mFacebook == null)
{
mFacebook = new FacebookService() {
ClientId = "<Your App ID from https://developers.facebook.com/apps>",
RedirectUrl = new Uri ("https://apps.facebook.com/yourappname/")
};
}
return mFacebook;
}
}
For which Platform are you developing? The rest of the share process is just like in the Xamarin.Social IOS Unified sample. Don‘t hesitate to ask for clarification.