how do i set cookies in php for twitter?
i have this varibale that i got from the database, that i want to store in a cookie to post to twitter,
i.e
$_COOKIE['oauth_token']=$row['o开发者_C百科auth_token'];
but how i set the cookie!!! thanks
you can store a cookie locally using setcookie()
but that cannot be used for 'posting to twitter', unless its just a temporary location to store the data, and you're posting the data via another means.
its worth looking at http://code.google.com/p/oauth-php/ if you're wanting to authenticate with external systems over OAuth.
Well you can use setcookie('oauth_token',...)
. But I don't think that does what you want it to do. You cannot set cookies for foreign domains.
精彩评论