Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot update geo #32

Closed
ccj-zz opened this issue Mar 2, 2012 · 5 comments
Closed

Cannot update geo #32

ccj-zz opened this issue Mar 2, 2012 · 5 comments
Assignees
Labels

Comments

@ccj-zz
Copy link

ccj-zz commented Mar 2, 2012

$connection->url('1/statuses/update'), array("status" => $tweet_text, "lat" => $lat, "long" => $long, "display_coordinates" => 'true'));

Status is updated lat and long silently fail.

With Net-Twitter (Perl) this works
my $result = $nt->update({status => $tweet_text, lat=> $lat, long=>$long});

@ghost ghost assigned themattharris Mar 2, 2012
@themattharris
Copy link
Owner

Is geo enabled on the account you are trying to tweet to? Users can choose whether geo is enabled or not. It geo is disable the Twitter API will silently ignore the lat/long parameters. This is documented on dev.twitter.com in the statuses/update documentation: https://dev.twitter.com/docs/api/1/post/statuses/update

@ccj-zz
Copy link
Author

ccj-zz commented Mar 2, 2012

Thanks for your help.

Yes the account is geo enabled. I used the PERL script on that account and it worked.

@themattharris
Copy link
Owner

Interesting, can you try again but this time var_dump the tmhOAuth connection when it finishes. I'd like to see the request params and how they are formatted.

When you copy the tmhOAuth object remember to remove the consumer_secret and oauth_secret (and any other information you don't want to share publicly)

@ccj-zz
Copy link
Author

ccj-zz commented Mar 3, 2012

oops! I can now. Using your sample code all works well. The code from http://140dev.com/twitter-api-programming-tutorials/hello-twitter-oauth-php/ seems to fail. Sorry to waste time
...
$connection->request('POST',
$connection->url('1/statuses/update'),
array("status" => $tweet_text, "lat" => $lat, "long" => $long));

return $connection->response['code'];

@themattharris
Copy link
Owner

Great, glad you got it working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants