Facebook api无效的应用程序 [英] Facebook api invalid app iD

查看:129
本文介绍了Facebook api无效的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Facebook SKD有一些问题。当我尝试登录时,我会收到无效的应用ID。你能帮我弄清楚问题是什么吗?





我的Facebook应用程序如下所示:





清单:

 < application 
android:allowBackup =true
android:icon =@ drawable / ic_launcher
android:label =@ string / app_name
android:theme =@ style / AppTheme>
< activity
android:name =。MainActivity
android:label =@ string / app_name>
< intent-filter>
< action android:name =android.intent.action.MAIN/>

< category android:name =android.intent.category.LAUNCHER/>
< / intent-filter>
< / activity>
< activity
android:name =com.facebook.FacebookActivity
android:label =@ string / app_name
android:theme =@ android:style / Theme.Translucent.NoTitleBar/>

< meta-data
android:name =com.facebook.sdk.ApplicationId
android:value =70208723325 ****/>
< / application>


解决方案

如果有人遇到这个问题,不将appId值直接放在清单文件中。相反,你应该把它放在字符串中,然后在你的表单中。



< meta-data android:name =com.facebook.sdk。 ApplicationIdandroid:value =@ string / facebook_app_id/>



这是奇怪的,但它适用于我。


I have some problem with facebook SKD. I get invalid app ID when I am trying to login. Can you please help me figure out what the problem is?

My facebook app looks like this:

Manifest:

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.facebook.FacebookActivity"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" />

    <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="70208723325****" />
</application>

解决方案

In case anyone has this problem, I fixed it with not putting the appId value directly in the manifest file. Instead you should put it in strings and then in manifest you put

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

It's strange but it works for me.

这篇关于Facebook api无效的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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