我试图设置解析SDK的facebook登录。我按照列出的here
步骤进行了操作但是当我尝试使用Facebook登录时,我得到了这个:
06-06 23:01:37.733 7366-30131/? W/fb4a(:<default>):BlueServiceQueue﹕ Exception during service
com.facebook.http.protocol.ApiException: [code] 100 [message]: (#100) Param third_party_app_id must be a valid application id [extra]:
at com.facebook.http.protocol.ApiResponseChecker.b(ApiResponseChecker.java:104)
at com.facebook.http.protocol.ApiResponseChecker.a(ApiResponseChecker.java:137)
at com.facebook.http.protocol.ApiResponseChecker.a(ApiResponseChecker.java:234)
at com.facebook.http.protocol.ApiResponseChecker.a(ApiResponseChecker.java:185)
at com.facebook.http.protocol.JsonResponseHandler.a(JsonResponseHandler.java:34)
at com.facebook.http.protocol.ApiResponseHandler.b(ApiResponseHandler.java:93)
at com.facebook.http.protocol.ApiResponseHandler.a(ApiResponseHandler.java:54)
at com.facebook.http.protocol.ApiResponseHandler.handleResponse(ApiResponseHandler.java:29)
at com.facebook.http.common.FbHttpRequestProcessor.a(FbHttpRequestProcessor.java:1004)
at com.facebook.http.common.FbHttpRequestProcessor.a(FbHttpRequestProcessor.java:305)
at com.facebook.http.common.FbHttpRequestProcessor.a(FbHttpRequestProcessor.java:247)
at com.facebook.http.common.FbHttpRequestProcessor.a(FbHttpRequestProcessor.java:98)
at com.facebook.http.common.FbHttpRequestProcessor$Dispatcher.a(FbHttpRequestProcessor.java:1215)
at com.facebook.http.common.FbHttpRequestProcessor$Dispatcher.run(FbHttpRequestProcessor.java:1207)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.facebook.common.executors.ConstrainedListeningExecutorService$Worker.run(ConstrainedListeningExecutorService.java:308)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at com.facebook.common.executors.NamedThreadFactory$1.run(NamedThreadFactory.java:38)
at java.lang.Thread.run(Thread.java:818)
任何帮助将不胜感激:)
答案 0 :(得分:3)
将元数据元素添加到应用程序元素:
<application android:label="@string/app_name" ...>
...
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
...
请务必添加:
<string name="facebook_app_id">YOUR_APP_ID</string>
到你的strings.xml文件