Recently I read a nice tutorial How to Authenticate Users With Twitter OAuth even it written before changing twitter ID format but it works with the new Twitter ID Format too.
I have some questions , please explain if anybody done it successfully..
Why we always call two method
getRequestToken
andgetAccessToken
? Is it to getaccess token
andaccess token secret
? but both are already given at below page...http://dev.twitter.com/apps/{your_app_id}/my_token.
what is the exactly need of request token and request token secret?? although i notice that both token comes different each time we process.
if we update our status from below method
$connection->post( 'statuses/update', array('status' => 'some message got from text area value' );
Then how do we verify that status has been updated successfully?? It means if i want to display alert message post has been sent successfully
, how do i implement that in our PHP page??
which callback URL is important, i.e. where actually user is navigated after posting or doing stuff on twitter?
is it the URL
Registered OAuth Callback URL
which is written at the time of developing an application onhttp://dev.twitter.com/apps/{id_no}
oris it the URL which is defined in our php code (
config.php
) likedefine('OAUTH_CALLBACK', 'http://www.xyz.com');
one more Q'n
- How to handle deny the access of applications?
Note: Please refer my Question regarding this
update for @Thai
i did below according to your suggestion
$user_info = $connection->get('account/verify_credentials');
$status_info =$connection->get('statuses/show/', array('id' =>32320907720523776) );
echo "<pre>";
print_r($status_info);
echo "</pre> Content : <pre>";
print_r($user_info);
returns below
stdClass Object
(
[request] => /1/statuses/show.json?id=3.2320907720524E%2B16&oauth_consumer_key=jashak..&oauth_nonce=bec...&oauth_signature=%2FMj%2B0Z7oyYNKdMn%2B%2FOJ6Ba8ccfo%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1296541384&oauth_token=223961574-cW4...&oauth_version=1.0a
[error] => No status found with that ID.
)
note: i hide the oauth_consumer key
,oauth_nonce
and oauth_token
for security purpose ;)
Content:
stdClass Object
(
[follow_request_sent] =>
[profile_link_color] => 038543
[profile_image_url] => http://a3.twimg.com/profile_images/1215444646/minialist-photography-9_normal.jpg
[contributors_enabled] =>
[favourites_count] => 31
[profile_sidebar_border_color] => EEEEEE
[id_str] => 223961574 // this is also id_str
[status] => stdClass Object
(
[retweeted] =>
[id_str] => 32320907720523776 // this id_str i used
[in_reply_to_status_id_str] =>
[geo] =>
[contributors] =>
[source] => Black Noise
[in_reply_to_user_id_str] =>
[retweet_count] => 0
[truncated] =>
[coordinates] =>
[created_at] => Tue Feb 01 06:14:39 +0000 2011
[favorited] =>
[text] => Twitter test: verify that status has been updated
[place] =>
[in_reply_to_screen_name] =>
[in_reply_to_status_id] =>
[id] => 3.2320907720524E+16
[in_reply_to_user_id] =>
)
[screen_name] => ltweetl
[profile_use_background_image] => 1
....
...
i got error No status found with that ID
and which id_str
u r mentioning??