Android Facebook,如何获取状态ID

时间:2014-04-03 07:26:35

标签: android

要获得Facebook好友状态,我必须根据图表Api提供状态ID https://developers.facebook.com/docs/graph-api/reference/status。获取状态ID的方法是什么?

1 个答案:

答案 0 :(得分:0)

这将对您有所帮助:

if (session.isOpened()) {
    // make request to the /me API
    Request.executeMeRequestAsync(session, new Request.GraphUserCallback() 
    {
    // callback after Graph API response with user object

    @Override
    public void onCompleted(GraphUser user, Response response) {
        if (user != null) {
            id=user.getId();
            Toast.makeText(getApplicationContext(), session.getAccessToken(), 100).show();
        }
    }
});
}