开发者

how do i set cookies in php for twitter?

开发者 https://www.devze.com 2023-02-01 22:02 出处:网络
i have this varibale that i got from the database, that i want to store in a cookie to post to 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消