{"action":"created","issue":{"url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin/issues/868","labels_url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin/issues/868/labels{/name}","comments_url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin/issues/868/comments","events_url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin/issues/868/events","html_url":"https://github.com/Wizcorp/phonegap-facebook-plugin/issues/868","id":52868345,"number":868,"title":"Support (non-complicated) Post for facebookConnectPlugin.api()","user":{"login":"drastick","id":2067242,"avatar_url":"https://avatars.githubusercontent.com/u/2067242?v=3","gravatar_id":"","url":"https://api.github.com/users/drastick","html_url":"https://github.com/drastick","followers_url":"https://api.github.com/users/drastick/followers","following_url":"https://api.github.com/users/drastick/following{/other_user}","gists_url":"https://api.github.com/users/drastick/gists{/gist_id}","starred_url":"https://api.github.com/users/drastick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drastick/subscriptions","organizations_url":"https://api.github.com/users/drastick/orgs","repos_url":"https://api.github.com/users/drastick/repos","events_url":"https://api.github.com/users/drastick/events{/privacy}","received_events_url":"https://api.github.com/users/drastick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-12-25T17:20:37Z","updated_at":"2015-07-10T07:45:52Z","closed_at":null,"body":"This was mentioned in https://github.com/Wizcorp/phonegap-facebook-plugin/issues/562 but as far as I can tell it has gone nowhere. It would be nice to be able to post to the api like this:\r\n\r\n```\r\nfacebookConnectPlugin.api(\"/[group]/feed\", 'post', {message: 'message'}, function(response) {});\r\n```\r\n\r\nThis seems like functionality a lot of people would want which is why I'm surprised it hasn't been implemented yet."},"comment":{"url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin/issues/comments/120271048","html_url":"https://github.com/Wizcorp/phonegap-facebook-plugin/issues/868#issuecomment-120271048","issue_url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin/issues/868","id":120271048,"user":{"login":"mcodo","id":4014103,"avatar_url":"https://avatars.githubusercontent.com/u/4014103?v=3","gravatar_id":"","url":"https://api.github.com/users/mcodo","html_url":"https://github.com/mcodo","followers_url":"https://api.github.com/users/mcodo/followers","following_url":"https://api.github.com/users/mcodo/following{/other_user}","gists_url":"https://api.github.com/users/mcodo/gists{/gist_id}","starred_url":"https://api.github.com/users/mcodo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcodo/subscriptions","organizations_url":"https://api.github.com/users/mcodo/orgs","repos_url":"https://api.github.com/users/mcodo/repos","events_url":"https://api.github.com/users/mcodo/events{/privacy}","received_events_url":"https://api.github.com/users/mcodo/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T07:45:52Z","updated_at":"2015-07-10T07:45:52Z","body":"The above solution is almost correct :-)\r\nBut to use \"publish_actions\" in OpenGraph you have to provide the access token as well.\r\nSo when you log in via facebookConnectPlugin.login you should save the access token to local storage so this can be used when you want to do do stuff in OpenGraph API.\r\n\r\nExample Login to get access token to publish_actions:\r\n```javascript\r\nfunction getPublishPerm(){\r\nconsole.log(\"DOING LOGIN FOR publish_actions\");\r\n    facebookConnectPlugin.login([\"publish_actions\"],\r\n        function (response){\r\n            if(response.status == \"connected\")\r\n                window.localStorage.setItem(\"fbtoken\",response.authResponse.accessToken);\r\n                console.log(\"FB to publish_actions: \" + JSON.stringify(response));   \r\n        }, \r\n            function (error) { console.log(\"FB ERROR: \" + JSON.stringify(error)); }\r\n    );\r\n}\r\n```\r\n\r\nExample function to do publish_actions:\r\n```javascript\r\nfunction FBAction(){\r\n    facebookConnectPlugin.getLoginStatus( function(response) {\r\n                var url = '/me/feed?method=post&message=' + encodeURIComponent('Test') + '&access_token=' + window.localStorage.getItem(\"fbtoken\");\r\n                facebookConnectPlugin.api(\r\n                    url,\r\n                    ['publish_actions'],\r\n                function (response) { console.log(response); },\r\n                function (error) { console.error(error); }\r\n                );\r\n            });\r\n}\r\n```\r\n\r\nI hope this can help anyone :-)\r\n"}}