开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜