开发者

Titanium.Facebook getting graph api access token

开发者 https://www.devze.com 2023-03-01 15:55 出处:网络
I\'m developing an iPhone app with Appcelerator Titanium SDK 1.6.2 I am upload an photo to a users facebook album with the Titanium Facebook module, graph api.

I'm developing an iPhone app with Appcelerator Titanium SDK 1.6.2

I am upload an photo to a users facebook album with the Titanium Facebook module, graph api.

The upload goes just fine and returns the items unique ID.

When I try to parse the JSON from the unique id I'm told i need to pass an access token, which makes sense.

How do I get the access token to be passed to the graph request url?

When I do a XHR GET request while passing Ti.Facebook.accessToken I get the开发者_开发百科 following error

URL: https://graph.facebook.com/10150527948301195?access_token=t4CqzHallahfy4d7RnERrJb4ffOkQfJvrYrGEBoZ4so.epdiI6IjJGR2ZFY1ZTMHh6RlR6ZmNIcVctMHcifQ.NBRMth0vb7pXKcd8lHNz9aremoyNpvrbhz2P3zkgWJU4eHdfewOp1WruBNZS_lSDy0XM0Xu0ACry8aEmSckGJVQJxEioykrNZhT7S9mJG2OKWqMdk6ucg5IMhXMfndF9sdKwWrWb7uPKI57LzIOf5lvA

{
    error = {
        message = "Unsupported post request.";
        type = GraphMethodException;
    };
}

And if I don't pass Ti.Facebook.accessToken I'm asked for it.

I'm bound to be missing something, any help would be greatly appreciated.


see this link http://developer.appcelerator.com/blog/2011/02/facebook-module-changes-in-titanium-mobile-1-6-0.html

I think you should be using Titanium.Facebook.requestWithGraphPath(...)

0

精彩评论

暂无评论...
验证码 换一张
取 消