2016-04-14 9 views
0

Kullanıcı mesajlarını FB SDK ile almaya çalışıyorum ancak bir hata alıyorum. Neyin yanlış olduğuyla ilgili bir fikriniz var mı? Ben olsunFacebook SDK user_posts: İstediğiniz takma adların bir kısmı mevcut değil

let gr2 : FBSDKGraphRequest = FBSDKGraphRequest(graphPath: "user_posts", parameters: nil) 
gr2.startWithCompletionHandler({ (connection, result2, error) -> Void in 

}) 

Hata geçerli:

(lldb) po error 
Error Domain=com.facebook.sdk.core Code=8 "(null)" UserInfo={com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode=803, com.facebook.sdk:FBSDKGraphRequestErrorParsedJSONResponseKey={ 
    body =  { 
     error =   { 
      code = 803; 
      "fbtrace_id" = "Fo/ky5BIe7W"; 
      message = "(#803) Some of the aliases you requested do not exist: user_posts"; 
      type = OAuthException; 
     }; 
    }; 
    code = 404; 
}, com.facebook.sdk:FBSDKGraphRequestErrorHTTPStatusCodeKey=404, com.facebook.sdk:FBSDKErrorDeveloperMessageKey=(#803) Some of the aliases you requested do not exist: user_posts, com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey=0} 

cevap

0

user_posts bir izin değil, bir API uç noktasıdır.

Kullanıcı mesajlarını almak için user_posts numaralı kullanıcıları yetkilendirmeniz ve /me/posts uç noktasını kullanmanız gerekir.

Gerçekten Arada bir docs bakmak gerekir, her şey için bile örnek kod vardır: https://developers.facebook.com/docs/graph-api/reference/v2.6/user/feed

Bir izni ve API bitiş arasındaki farkı anlamak emin olun.