Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用图形 api 在 iPhone 应用程序中获取 Facebook 照片喜欢和不喜欢的数量?
提前致谢。
只需使用 FB 对象调用一个新请求:
[facebook requestWithGraphPath:@"PHOTO_ID/likes"];
替换PHOTO_ID为您感兴趣的照片的 Facebook ID。此调用将返回一个数组,其中包含该照片的所有类似信息。
PHOTO_ID
在该-facebook requestDidLoad:方法中,只需获取该数组的计数即可返回喜欢的数量。
-facebook requestDidLoad:
NSInteger likeCount = [result count];