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

≯℡__Kan透↙ 提交于 2019-12-05 18:51:31

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.

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!

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