选择Graph API或适用于Facebook应用程序的旧REST API [英] Choose Graph API or old REST API for Facebook application

查看:76
本文介绍了选择Graph API或适用于Facebook应用程序的旧REST API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该在Facebook开发者论坛中问这个问题,但是以某种方式我无法注册到该论坛,并且在撰写本文时,Facebook Connect功能无法正常工作.

I should have asked this in Facebook developer forum instead, but somehow I can't register to the forum and the Facebook connect feature is not working at the time I'm writing this.

无论如何,我还是为我的Facebook应用程序使用Graph API还是旧的REST API感到困惑. 通常,这是我要在我的应用程序中实现的目标:

Anyway, I am still confused whether to use Graph API or the old REST API for my Facebook app. Generally, this is what I want to achieve in my app:

  1. 获取个人资料图片和用户名.
  2. 获取个人资料图片和也在使用我的应用程序的用户朋友的姓名.
  3. 发布到用户流中.
  4. 允许用户邀请其朋友使用该应用程序.

有人可以为我提供一种见解,哪个对我的应用程序更好?

Can someone provide me an insight, which one is better for my application?

推荐答案

  1. 获取个人资料图片和用户名.
      名称的
    • http://graph.facebook.com/[uid]http://graph.facebook.com/[uid]/picture是当前图片的始终最新链接.另外,如果您具有access_token,则可以查询 http://graph.facebook.com/me 获取当前用户(无论是谁)上的数据.
  1. Get profile picture and name of the user.
    • http://graph.facebook.com/[uid] for the name and http://graph.facebook.com/[uid]/picture is an always up-to-date link to the current picture. Also, if you have an access_token, you can query http://graph.facebook.com/me for data on the current user, whoever that is.
  • 不确定如何仅使用FQL来结识特定朋友.但是,请注意,您可以通过添加fields参数来获取好友列表中的特定字段(默认为姓名和ID):.../friends?fields=id,name,picture
  • Not sure about how to get the specific friends only, maybe using FQL. However, note that you can get specific fields in the friends list (defaults to just name and id) by adding a fields parameter: .../friends?fields=id,name,picture
  • Perform an HTTP POST to http://graph.facebook.com/[uid]/feed with a body parameter. (see http://developers.facebook.com/docs/api#publishing)
  • 对不起,不确定这一点...

这篇关于选择Graph API或适用于Facebook应用程序的旧REST API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆