Where does this error come from? Error: com.facebook.FacebookException: Failed to get app name

六月ゝ 毕业季﹏ 提交于 2019-12-22 08:55:57

问题


I am unable to figure this out. I have added my keyhashes and all to the Facebook webpage but I am unable to figure out this error

11-12 19:51:27.744: D/HelloFacebook(5188): Error: com.facebook.FacebookException: Failed to get app name.

回答1:


I found this exception when my Facebook app is in Sandbox Mode but logged in and try to post status by a user who not included in developer list. You may check your developer roles or disable the Sandbox Mode.




回答2:


I faced this problem and got its solution by putting Application name into FacebookDialog. So here is the solution

FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(activity)
    .setLink("https://www.google.com")
    .setApplicationName("name of app")
    .build();
    uiHelper.trackPendingDialogCall(shareDialog.present());

It works for me!




回答3:


I ran into the same issue and in my case, I was missing an entry in the AndroidManifest.xml file i.e.

<meta-data
        android:name="com.facebook.sdk.ApplicationName"
        android:value="@string/app_name" />


来源:https://stackoverflow.com/questions/19943807/where-does-this-error-come-from-error-com-facebook-facebookexception-failed-t

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