我使用PHP的Facebook SDK獲得來自經過認證的用戶朋友:從應用程序獲取真正的Facebook用戶ID範圍的
GET /v2.2/<userID>/taggable_friends
我得到一個數組的元素是這樣的:
object(stdClass)[4691]
public 'id' => string 'AaJXJQ2G...VAnlcRjdLTsA' (length=110)
public 'name' => string '...' (length=13)
public 'picture' =>
object(stdClass)[4690]
public 'data' =>
object(stdClass)[4689]
public 'is_silhouette' => boolean false
public 'url' => string 'https://scontent.xx.fbcdn.net/hprofile-xta1/....jpg?' (length=162)
現在我想向一些朋友發送通知,但上面的id是「app scoped id」,所以如果我通過此調用調用通知API:
POST /v2.2/<friend_app_scoped_ID>/notifications?access_token=<my_app_access_token>&href=<some_link>&template=<text>
我得到這個錯誤:
(#803) Some of the aliases you requested do not exist: <friend_app_scoped_ID>
我認爲應用範圍的ID是與我的應用程序,我有我的發送通知請求之前得到真正的用戶ID。
任何人都知道我該怎麼做?
謝謝:)
感謝您的信息:) – Sylvain