In my Android app, I am integrating the Facebook SDK to have the shareDialog in it. The share dialog open perfectly with the pre-populated details. When I clicked SHARE on top right of sharedialog screen, I am getting the below mentioned error in logcat and in Toast. Please let me know where my config needs correction.

Logcat

04-17 15:15:47.140: E/Facebook(14515): Error: com.facebook.FacebookException: Failed to     
authenticate the application because of app name mismatch.  Please check the application   
name configured by the dialog.
有帮助吗?

解决方案

Go to Facebook developers page

Apps --> "YourApp" --> settings -->

Then change Package name (your application package name) and Class name (your activity class name)

for an example:

enter image description here

其他提示

This error is occuring due to mismatch of name, may be package name or class name or even application ID.

You need to check the AndroidMainfest.xml and also the dashboard of https://developers.facebook.com/apps/yourAppID/settings/. On the xml check if this is same as on the dashboard

<meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="app_id" />   //the app_id must be same as on the dashboard

    <activity android:name="com.facebook.LoginActivity" >
    </activity>

Also check for the package name, class name of the dashboard is same on your android app.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top