{ "id": "159121", "key": "MOD-2251", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10034", "key": "MOD", "name": "Appcelerator Modules", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2016-07-18T10:43:30.000+0000", "created": "2016-03-29T23:37:38.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "studio3" ], "versions": [], "issuelinks": [], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-07-18T10:43:30.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14521", "name": "Facebook" } ], "description": "{code}\r\ncalling function getFBEvents(){\r\n if(fb.getLoggedIn()){\r\n fb.permissions = ['user_friends', 'user_events'];\r\n fb.requestWithGraphPath('me?fields=events', {}, 'GET', function(e) {\r\n if (e.success) { \r\n Ti.API.log('arrow.js : getFBEvents - result ' + e.result);\r\n }\r\n });\r\n }\r\n}\r\n{code}\r\nThe above methods successfully returns results.\r\nBut changing the graph request to specify the fields like this fails in appcelerator\r\n{code}\r\n fb.requestWithGraphPath('me?fields=events{id,name,description,ticket_uri}', {}, 'GET', function(e) {\r\n{code}\r\nThis however does work when using the Facebook Graph API Explorer.\r\nThis 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.\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "Facebook: graph api not returning results when fields are specified, possibly due to old version of graph api", "creator": { "name": "sean.maclachlan", "key": "sean.maclachlan", "displayName": "Sean MacLachlan", "active": true, "timeZone": "America/Boise" }, "subtasks": [], "reporter": { "name": "sean.maclachlan", "key": "sean.maclachlan", "displayName": "Sean MacLachlan", "active": true, "timeZone": "America/Boise" }, "environment": "Appcelerator 4.5\r\nTitanium 5.2\r\niPhone 6", "comment": { "comments": [ { "id": "381899", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "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.\r\n\r\n{code}\r\nif(fb.permissions.indexOf('publish_actions') < 0) {\r\n\t\t\tfb.requestNewPublishPermissions(['publish_actions'],fb.AUDIENCE_FRIENDS,function(e){\r\n\t\t\t\tif(e.success) {\r\n\t\t\t\t\tTi.API.info('Permissions:'+fb.permissions);\r\n\t\t\t\t\tfb.requestWithGraphPath('me/photos', data, \"POST\", showRequestResult);\r\n\t\t\t\t}\r\n\t\t\t\tif(e.error) {\r\n\t\t\t\t\tTi.API.info('Publish permission error');\r\n\t\t\t\t}\r\n\t\t\t\tif(e.cancelled) {\r\n\t\t\t\t\tTi.API.info('Publish permission cancelled');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tfb.requestWithGraphPath('me/photos', data, \"POST\", showRequestResult);\r\n\t\t}\r\n{code}\r\n\r\nRegards,\r\nSharif.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-04-06T19:46:26.000+0000", "updated": "2016-04-06T19:46:26.000+0000" }, { "id": "381900", "author": { "name": "sean.maclachlan", "key": "sean.maclachlan", "displayName": "Sean MacLachlan", "active": true, "timeZone": "America/Boise" }, "body": "The code is already in this bug report.\r\n\r\nThe problem is \r\n{code}fb.requestWithGraphPath('me?fields=events{color:red}{id,name,description,ticket_uri}{color}', {}, 'GET', function(e){code}", "updateAuthor": { "name": "sean.maclachlan", "key": "sean.maclachlan", "displayName": "Sean MacLachlan", "active": true, "timeZone": "America/Boise" }, "created": "2016-04-06T19:51:33.000+0000", "updated": "2016-04-06T19:51:33.000+0000" }, { "id": "381988", "author": { "name": "sean.maclachlan", "key": "sean.maclachlan", "displayName": "Sean MacLachlan", "active": true, "timeZone": "America/Boise" }, "body": "More specifically\r\n'me?fields=events{color:#d04437}{id,name,description,ticket_uri}{color}'", "updateAuthor": { "name": "sean.maclachlan", "key": "sean.maclachlan", "displayName": "Sean MacLachlan", "active": true, "timeZone": "America/Boise" }, "created": "2016-04-06T19:53:14.000+0000", "updated": "2016-04-06T19:53:14.000+0000" }, { "id": "383135", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nPlease 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.\r\n\r\nRegards,\r\nSharif.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-04-19T14:54:50.000+0000", "updated": "2016-04-19T14:55:58.000+0000" }, { "id": "383181", "author": { "name": "sean.maclachlan", "key": "sean.maclachlan", "displayName": "Sean MacLachlan", "active": true, "timeZone": "America/Boise" }, "body": "This code reproduces the problem.\r\n\r\n{code:java}\r\nfunction getFBEvents(){\r\n if(fb.getLoggedIn()){\r\n fb.permissions = ['user_friends', 'user_events'];\r\n fb.requestWithGraphPath('me?fields=events{id,name,description,ticket_uri}', {}, 'GET', function(e) {\r\n if (e.success) { \r\n Ti.API.log('arrow.js : getFBEvents - result ' + e.result);\r\n }\r\n });\r\n }\r\n}\r\n{code}\r\n\r\nActual Result:\r\nError {\"success\":false,\"path\":\"me?fields=events{id,name,description,ticket_uri}\"}\r\n\r\nThis is the result using the Facebook Graph API Explorer with \r\nme?fields=events{id,name,description,ticket_uri}\r\n\r\nExpected Result:\r\n{\r\n \"events\": {\r\n \"data\": [\r\n {\r\n \"id\": \"569818663179115\",\r\n \"name\": \"Saint Paddler's Day\",\r\n \"description\": \"Join us for the annual St. Paddler's Day Float and Potluck on Sunday, March 20th. \r\n\r\nMeet 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. \r\n\r\nIn 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.\r\n\r\nRentals of Kayaks, Canoes and Stand up Paddleboards available for 1/2 price.\r\n\r\nCall 208-336-4844 for more information.\"\r\n },\r\n],\r\n \"paging\": {\r\n \"cursors\": {\r\n \"before\": \"TlRZANU9ERTROall6TVRjNU1URTFPakUwTlRnME9URTBNREE2TVRrNU9EVTRNREV6TXprNE5EQTQZD\",\r\n \"after\": \"TVRBeE5USTNNVGcwT1RreU5qWTBNekk2TVRJM01ESTNNVEUwTXpveE9UazROVGd3TVRNek9UZAzBNRGc9\"\r\n }\r\n }\r\n },\r\n \"id\": \"10153942434722150\"\r\n}", "updateAuthor": { "name": "sean.maclachlan", "key": "sean.maclachlan", "displayName": "Sean MacLachlan", "active": true, "timeZone": "America/Boise" }, "created": "2016-04-19T18:18:45.000+0000", "updated": "2016-04-19T18:18:45.000+0000" }, { "id": "383941", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nPlease 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.\r\n\r\nRegards,\r\nSharif.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-04-26T15:26:41.000+0000", "updated": "2016-04-26T15:26:41.000+0000" }, { "id": "383946", "author": { "name": "sean.maclachlan", "key": "sean.maclachlan", "displayName": "Sean MacLachlan", "active": true, "timeZone": "America/Boise" }, "body": "Sharif,\r\n\r\nThe code included is the simplest code possible to reproduce the problem.\r\n\r\nfb.requestWithGraphPath('me?fields=events{id,name,description,ticket_uri}',...\r\nThis does not return a result.\r\nI just want the result of this call.\r\n\r\nThis does return a result\r\nfb.requestWithGraphPath('me?fields=events',...\r\n\r\nBy adding{color:#d04437} {id,name,description,ticket_uri}{color} to the Graph Path no result is returned\r\n\r\nThis 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", "updateAuthor": { "name": "sean.maclachlan", "key": "sean.maclachlan", "displayName": "Sean MacLachlan", "active": true, "timeZone": "America/Boise" }, "created": "2016-04-26T16:32:07.000+0000", "updated": "2016-04-26T16:32:07.000+0000" }, { "id": "384295", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "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.\r\nFiling ticket as improvement to update our module.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-29T03:02:40.000+0000", "updated": "2016-04-29T03:02:40.000+0000" }, { "id": "390891", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "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\r\n\r\nSo 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.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-07-18T10:43:30.000+0000", "updated": "2016-07-18T10:43:30.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }