简体   繁体   中英

Posting a tweet on the Twitter timeline using “TwitterOAuth”

I am trying to post a feed on Twitter using TwitterOAuth . I have two PHP scripts, redirect.php , and callback.php that work as follows.

redirect.php -> twitter auth -> callback.php

Whatever session key/values stored upon calling redirect.php are lost when callback.php is called for some reason.

The both PHP files reside in the same domain and HTTPS is used all the way through. session_start() is used in the both scripts right before storing and fetching session data.

What could be the cause of this problem?

It turns out that Apache was not able write session files to a directory(in my case, /var/lib/php/session ) specified in the php.ini.

Granting the write permission for this directory to Apache has solved the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM