A Facebook-like operation has been issued for mobile apps.
According to the documentation:
To publish an underlying action on an open graph object, the following HTTP POST request should be accessed by the user's access token and the URL of the Open Graph Object open with. This open graph object can be of any type. Curl -x Post \ -F 'access_token = USER_ACCESS_TOKEN' \ -F 'Object = OG_OBJECT_URL' \ https://graph.facebook.com/ [User Fb Id] / o.lok
Facebook facebook; Facebook = new Facebook (apaponfif.fasibuki_app_id); If (facebook.isSessionValid ()) {JSONObject obj = facebook.request ("me"); ...} Other {facebook.authorize (...) {@ Override Public Wide On Compilation (Bundle Value) {String Tokens = facebook.getAccessToken (); Expires for a long time = facebook.getAccessExpires (); ...}}} My question is dead, yet I can not find the answer, how do I "graph.facebook.com/ [user FB ID] / ova.like "Request, in Java code, when I retrieve and use the user's access token?
Do something like the following:
1 / You start Facebook frequency After you can declare the following:
asyncFacebookRunner mAsyncRunner = new asyncFacebookRunner (facebook); 2 / Then when you want to post like you can use the following code:
bundle parameters = new bundle (); Params.putString ("object", OG_OBJECT_URL); MAsyncRunner.request ("me / og.likes", parameters, "post", new basshext listener) {@ Override public wide on complex (final string response, final object state) {// success success}}} Finally to see a sample of open graphs, see this sample in action such as:
Comments
Post a Comment