[Error/Android/Facebook API] api 에러 / {"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500}}
{"error":{"message":"An active access token must be used to query information about the current user.","type":"OAuthException","code":2500}}
원인 및 해결방법
한꺼번에 해결해서 정확한 원인과 결과는 모른다.
다만 페이스북 디벨로퍼 홈페이지를 참조해도 알것이다.
가장 대표적인 에러라면서 글이 있다.
그 글을 해석해서 주요 내용을 보면 주로 권한에 관한 문제일것이다 라고 되어있다.
매니페스트에 프로바이더 추가하고, 퍼미션 주니까 잘 됀거같다.
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>
<provider android:authorities="com.facebook.app.NativeAppCallContentProvider(AppID)"
android:name="com.facebook.NativeAppCallContentProvider"
android:exported="true"/>
provider의 (AppID) 를 @string/app_id 값으로 바꿔줘야됌
ex) android:authorities="com.facebook.app.NativeAppCallContentProvider123456789123456"