{ "id": "135504", "key": "AC-963", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2014-09-24T01:33:56.000+0000", "created": "2014-08-28T15:18:32.000+0000", "labels": [ "TCSupportTriage" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:37:17.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": "14550", "name": "Appcelerator Modules", "description": "Please enter tickets related to Modules here." }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "User that have been logged in via Facebook, cannot Add Friend nor get FriendRequests from ACS.\r\n\r\nSample Code:\r\n{code}\r\nvar Cloud = require('ti.cloud');\r\nvar self = Ti.UI.createWindow({});\r\n\r\nvar faceBookLoginBtn = Ti.UI.createButton({ title : 'facebook login', });\r\nfaceBookLoginBtn.addEventListener('click', function() { fb.authorize(); });\r\nself.add(faceBookLoginBtn);\r\n\r\nfb.addEventListener('login', function(e) {\r\n if (e.success) {\r\n // Cloud.SocialIntegrations.externalAccountLogin({\r\n // type: 'facebook',\r\n // token: fb.getAccessToken(),\r\n // update their account on ACS (for custom reasons)\r\n // logs them in.\r\n // These work, as I do see them logged in & their info updated on ACS web Console\r\n });\r\n\r\n// after login to add friends or friends requests: **Node ACS** code:\r\n// Briefly, this works like Tinder, one user swipes right to sent a friend request to another user, \r\n// or if they already have a request from that user, they confirm the request to be Friends.\r\n\r\nfunction addFriend(req, res) {\r\n var results = {};\r\n\t// 1- Query currentUser Friend Requests\r\n\tCloud.Friends.requests({\r\n\t session_id: req.body.session_id\r\n },function (e) {\r\n if (e.success) {\r\n results.gotFriendRequests = true;\r\n var userHadRequest = _score.find(e.friend_requests, function(friendRequest){ return friendRequest.user.id === req.body.toBeFriend_id; });\r\n if (userHadRequest) {\r\n results.match = true;\r\n Cloud.Friends.approve({\r\n user_ids: req.body.toBeFriend_id,\r\n session_id: req.body.session_id\r\n }, function (_e) {\r\n if (_e.success) {\r\n results.approvedMatch = true;\r\n return res.send({results: results, matchedUser: userHadRequest.user.username, matchedUserId: userHadRequest.user.id});\r\n } else {\r\n results.approvedMatch = false;\r\n results.approvedMatchFailedReason = JSON.stringify(_e);\r\n return res.send(results);\r\n }\r\n });\r\n } else {\r\n // Didn't have a User request for this user\r\n Cloud.Friends.add({\r\n user_ids: req.body.toBeFriend_id,\r\n session_id: req.body.session_id\r\n }, function (e) {\r\n if (e.success) {\r\n results.friendRequestSent = true;\r\n return res.send(results);\r\n } else {\r\n results.friendRequestSent = false;\r\n results.friendRequestFailedReason = JSON.stringify(e);\r\n return res.send(results);\r\n }\r\n });\r\n }\r\n } else {\r\n results.gotFriendRequests = false;\r\n results.gotFriendRequestsFailedReason = JSON.stringify(e);\r\n return res.send(results);\r\n }\r\n });\r\n};\r\n{code}\r\n\r\nThe Above works with regular users (those that created an account on ACS with their username/email & password), but Does Not work with Facebook Logged in Users that want to add friends with any other ACS User.\r\n\r\nTo Recap: Only Facebook Logged-in Users cannot Add Friends, nor get Friend Requests, and returns:\r\n*Error code 500: Internal server error. The Appcelerator Cloud Services Team has just been notified of this problem.*\r\n\r\n_However, normal logged in Users (created account directly), Add Friend & Getting FriendRequests works normally._", "attachment": [], "flagged": false, "summary": "ACS - FB logged Users: addFriend / friendRequests throws an internal Error ", "creator": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "subtasks": [], "reporter": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "environment": "Ti SDK 3.3.0\r\nLogged in Facebook User via ACS SocialIntegrations", "comment": { "comments": [ { "id": "321149", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nWe have tested this issue with above codes. The Above codes does not work with regular users (those that created an account on ACS) and also not works with Facebook Logged in Users. Please provides some workable test case.\r\n\r\n*Testing Environment:*\r\nTitanium SDK: 3.3.0.GA and 3.2.3.GA\r\nTitanium CLI: 3.3.0 \r\nOS X Version: 10.9.3\r\nAndroid version: 4.3\r\nAndroid API Level: 17 and 19\r\n\r\n*Steps To Reproduce:*\r\n a) Create a simple project.\r\n b) Update this code in app.js\r\n c) Add ti.cloud module in tiapp.xml\r\n d) Run this with testing environment\r\n\r\n\r\nThanks", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-08-30T05:45:10.000+0000", "updated": "2014-09-23T05:42:55.000+0000" }, { "id": "324828", "author": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "body": "Can we bump this issue :) ", "updateAuthor": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "created": "2014-09-20T03:43:24.000+0000", "updated": "2014-09-20T03:43:24.000+0000" }, { "id": "325137", "author": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "body": "This issue has been fixed automatically, did not edit the code, but started working :)\r\nYou may close this ticket.", "updateAuthor": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "created": "2014-09-23T14:01:20.000+0000", "updated": "2014-09-23T14:01:20.000+0000" }, { "id": "325329", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Temporal glitch in the cloud.", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-09-24T01:33:56.000+0000", "updated": "2014-09-24T01:33:56.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }