オブジェクトも公開するアクションを作成しました。publish_actions 権限を有効にしました。アクションのリストは、 https ://graph.facebook.com/me/myApp:myAction から取得できます。
しかし、私は得ることができません: https://graph.facebook.com/me/friends/myApp:myAction
それとも、オブジェクトのリストを直接取得して、何らかの方法で自分自身を除外する必要がありますか? 関連付けられたアクションを介して呼び出さずにオブジェクト リストを取得する方法を実際に理解することはできません。それだけですか?
回避策: まず、fql.query で "select uid, name, is_app_user from user where uid in (select uid2 from friends where uid1=me()) and is_app_user=1" を実行し、アプリがインストールされている友達を取得します...
次に、そのクエリを取得し、それを使用して以下をバッチ処理します。
for (NSDictionary *d in friendsWithApp) {
NSString *jsonRequest = [NSString stringWithFormat:@"{ \"method\": \"GET\", \"relative_url\": \"%@/myApp:myAction/myObject\" }", [d objectForKey:@"uid"]];
jsonRequestsArray = [jsonRequestsArray stringByAppendingString:jsonRequest];
setCount++;
if (setCount!=[presets count]) {
jsonRequestsArray = [jsonRequestsArray stringByAppendingString:@", "];
}
}
jsonRequestsArray = [jsonRequestsArray stringByAppendingString:@" ]"];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObject:jsonRequestsArray forKey:@"batch"];
[facebook requestWithGraphPath:@"me" andParams:params andHttpMethod:@"POST" andDelegate:self];
うーん。この fql.query で使用可能なリストも取得しました。
「SELECT post_id、actor_id、attribution FROM stream WHERE filter_key in (SELECT filter_key FROM stream_filter WHERE uid=me() AND type='newsfeed') AND app_id = MY_APP_ID」
ただし、最新の 50 のニュース アイテムと競合するため、多くのアイテムは返されません。アプリを使いこなせばそれでいいのかもしれませんが、使用頻度が減り、古い投稿に簡単にたどり着けなくなってしまいそうです。