{"action":"created","issue":{"url":"https://api.github.com/repos/J7mbo/twitter-api-php/issues/64","labels_url":"https://api.github.com/repos/J7mbo/twitter-api-php/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/J7mbo/twitter-api-php/issues/64/comments","events_url":"https://api.github.com/repos/J7mbo/twitter-api-php/issues/64/events","html_url":"https://github.com/J7mbo/twitter-api-php/issues/64","id":28849378,"number":64,"title":"POST gives me {\"errors\":[{\"message\":\"Could not authenticate you\",\"code\":32}]}","user":{"login":"rvalsan","id":6869059,"avatar_url":"https://avatars.githubusercontent.com/u/6869059?v=3","gravatar_id":"","url":"https://api.github.com/users/rvalsan","html_url":"https://github.com/rvalsan","followers_url":"https://api.github.com/users/rvalsan/followers","following_url":"https://api.github.com/users/rvalsan/following{/other_user}","gists_url":"https://api.github.com/users/rvalsan/gists{/gist_id}","starred_url":"https://api.github.com/users/rvalsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvalsan/subscriptions","organizations_url":"https://api.github.com/users/rvalsan/orgs","repos_url":"https://api.github.com/users/rvalsan/repos","events_url":"https://api.github.com/users/rvalsan/events{/privacy}","received_events_url":"https://api.github.com/users/rvalsan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2014-03-06T04:29:36Z","updated_at":"2015-08-06T07:06:57Z","closed_at":"2015-05-10T12:40:30Z","body":"Hi,\r\n\r\nMy GET calls works perfect but I cant seem to post no matter what I tried. I tried single word statuses, urlencoding etc.\r\n\r\nGET (Works)\r\n\r\n/** URL for REST request, see: https://dev.twitter.com/docs/api/1.1/ **/\r\n$url = 'https://api.twitter.com/1.1/statuses/mentions_timeline.json';\r\n$requestMethod = 'GET';\r\n\r\n/** GET fields required by the URL above. See relevant docs as above **/\r\n$getfield = '?count=5';\r\n\r\n/** Perform a POST request and echo the response **/\r\n$twitter = new TwitterAPIExchange($settings);\r\n$txtTwitter = $twitter->setGetfield($getfield)->buildOauth($url, $requestMethod)->performRequest();\r\n\r\nPOST (Not working)\r\n\r\n/** URL for REST request, see: https://dev.twitter.com/docs/api/1.1/ **/\r\n$url = 'https://api.twitter.com/1.1/statuses/update.json';\r\n$requestMethod = 'POST';\r\n\r\n/** POST fields required by the URL above. See relevant docs as above **/\r\n$postfields = array('status'=> 'test',\r\n'in_reply_to_status_id' => 'rvalsan'\r\n);\r\n\r\n/** Perform a POST request and echo the response **/\r\n$twitter = new TwitterAPIExchange($settings);\r\necho $twitter->buildOauth($url, $requestMethod)\r\n->setPostfields($postfields)\r\n->performRequest();\r\n\r\nBoth use the same settings\r\n/** Set access tokens here - see: https://dev.twitter.com/apps/ **/\r\n$settings = array(\r\n'oauth_access_token' => \"token\",\r\n'oauth_access_token_secret' => \"secret\",\r\n'consumer_key' => \"key\",\r\n'consumer_secret' => \"secret\"\r\n);\r\n"},"comment":{"url":"https://api.github.com/repos/J7mbo/twitter-api-php/issues/comments/128272423","html_url":"https://github.com/J7mbo/twitter-api-php/issues/64#issuecomment-128272423","issue_url":"https://api.github.com/repos/J7mbo/twitter-api-php/issues/64","id":128272423,"user":{"login":"lakshmananvelusamy","id":2140592,"avatar_url":"https://avatars.githubusercontent.com/u/2140592?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshmananvelusamy","html_url":"https://github.com/lakshmananvelusamy","followers_url":"https://api.github.com/users/lakshmananvelusamy/followers","following_url":"https://api.github.com/users/lakshmananvelusamy/following{/other_user}","gists_url":"https://api.github.com/users/lakshmananvelusamy/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshmananvelusamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshmananvelusamy/subscriptions","organizations_url":"https://api.github.com/users/lakshmananvelusamy/orgs","repos_url":"https://api.github.com/users/lakshmananvelusamy/repos","events_url":"https://api.github.com/users/lakshmananvelusamy/events{/privacy}","received_events_url":"https://api.github.com/users/lakshmananvelusamy/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T07:06:57Z","updated_at":"2015-08-06T07:06:57Z","body":"@J7mbo  Hi James, Thanks for the wonderful utility. \r\n\r\nI am using your latest library. The get calls are going fine but the post calls are returning \"{\"errors\":[{\"code\":32,\"message\":\"Could not authenticate you.\"}]}\". The tokens seem okay and the app has both read & write permissions. Could you please help?"}}