calling function getFBEvents(){
if(fb.getLoggedIn()){
fb.permissions = ['user_friends', 'user_events'];
fb.requestWithGraphPath('me?fields=events', {}, 'GET', function(e) {
if (e.success) {
Ti.API.log('arrow.js : getFBEvents - result ' + e.result);
}
});
}
}
The above methods successfully returns results.
But changing the graph request to specify the fields like this fails in appcelerator
fb.requestWithGraphPath('me?fields=events{id,name,description,ticket_uri}', {}, 'GET', function(e) {
This however does work when using the Facebook Graph API Explorer.
This requires version 2.4 or 2.5 to work. It appears that an older version of the Graph API is being used and there is no way to specify which version to use.
Hello, Can you provide a full reproducible code. I am using the below code section for uploading photos. This code comes with the facebook module example code. Please advise where I should make changes. I am using SDK 5.2.1.GA. with facebook module version 5.1.0.
Regards, Sharif.
The code is already in this bug report. The problem is
More specifically 'me?fields=events{color:#d04437}{id,name,description,ticket_uri}{color}'
Hello, Please provide a full reproducible code or a sample project that demonstrate the issue. The code section you provided it's not clear what you are trying to do. Also, please provide full steps to reproduce. Regards, Sharif.
This code reproduces the problem.
Actual Result: Error {"success":false,"path":"me?fields=events{id,name,description,ticket_uri}"} This is the result using the Facebook Graph API Explorer with me?fields=events{id,name,description,ticket_uri} Expected Result: { "events": { "data": [ { "id": "569818663179115", "name": "Saint Paddler's Day", "description": "Join us for the annual St. Paddler's Day Float and Potluck on Sunday, March 20th. Meet at 10:30 am at the Montour Bridge (Montour Wildlife Area). Maps and directions available from IRS. We will do the vehicle shuttle and then paddle on the Payette, stopping about halfway down on an island to stretch our legs and of course EAT. In the past we have paddled and then returned to Idaho River Sports to eat. This year, weather permitting, we thought we would try having our Irish feast on the river. BRING your potluck dish with you in your kayak, canoe or SUP and we will celebrate St. Paddler's day on the river. Rentals of Kayaks, Canoes and Stand up Paddleboards available for 1/2 price. Call 208-336-4844 for more information." }, ], "paging": { "cursors": { "before": "TlRZANU9ERTROall6TVRjNU1URTFPakUwTlRnME9URTBNREE2TVRrNU9EVTRNREV6TXprNE5EQTQZD", "after": "TVRBeE5USTNNVGcwT1RreU5qWTBNekk2TVRJM01ESTNNVEUwTXpveE9UazROVGd3TVRNek9UZAzBNRGc9" } } }, "id": "10153942434722150" }
Hello, Please provide a full reproducible code or a sample project that demonstrate the issue. A partial section of code will not do. The code section you provided it's not clear what you are trying to do. Also, please provide full steps to reproduce. Regards, Sharif.
Sharif, The code included is the simplest code possible to reproduce the problem. fb.requestWithGraphPath('me?fields=events{id,name,description,ticket_uri}',... This does not return a result. I just want the result of this call. This does return a result fb.requestWithGraphPath('me?fields=events',... By adding{color:#d04437} {id,name,description,ticket_uri}{color} to the Graph Path no result is returned This is an appcelerator bug because when I add that command in the developers.facebook.com > Graph Path Explorer that command is valid and does return a result
As [~sean.maclachlan] has mentioned, it's most likely our Facebook module is supporting an older version that is not 2.4. or 2.5. Filing ticket as improvement to update our module.
We are using the latest Facebook SDK on both iOS and Android. As we just call the native method (that uses the latest graph), this is how it is done: http://stackoverflow.com/questions/32437731/facebook-sdk-2-4-how-to-get-events-from-user So specifying "me/events" and {fields: "id,name,description,ticket_uri"} for the 2nd param could work out. Closing for now, since it is no issue on our side but on the format specified.