Open ayaribrahim opened 8 years ago
@arthurlataks How would you post to user's feed or like on behalf of user?
This worked:
CordovaFacebook.graphRequest({
path: '/---userid---/feed',
params: { access_token: '---useraccesstoken---', method: 'POST', message: "test" },
onSuccess: function (result) {
console.log(result);
},
onFailure: function (result) {
if (result.error) { alert('error', 'There was an error in graph request:' + result.errorLocalized); }
}
});
Hi,
thanks for the help, but all the rest of the methods and their arguments should really be documented in README as well, not just the .login
and the .logout
ones.
@shtaif it's like the fields parameter is not sent: can you help with this one?
window.CordovaFacebook.graphRequest({
path: '/me',
params: {
access_token: accessToken,
fields: 'first_name,last_name',
},
onSuccess: result => resolve(result),
onFailure: result => reject(result),
});
The call runs fine but printing the result I see just "id" and "name" fields like the "fields" param was ignored and not passed through: how can I debug this?
Using Graph Request. Path "me" can be used when there is currently authenticated user. If there is none - refer to the Facebook Graph API docs.