I got that Error when submitting an Poll to Twitter [FIXED]

kaoschris
kaoschris
  • kaoschris
  • 14 months ago
Hello Community Hello Maverick, I got the twitter thing finally to work. I edited helper.php, twitter.php, bitly.php and tinyurl.php. In helper.php i removed a bug wich occurs with alphauserpoints when helper.php try to fetch the Profilelink and Name, it works with the Avatar but returns a link to the Profile in clear Text instead of the Username. That is now fixed.

And in twitter.php,bitly.php and tinyurl.php i edited the cURL Options:

LINE 154 in Twitter.php
// set options
$options[CURLOPT_URL] = $url;
$options[CURLOPT_PORT] = self::TWITTER_API_PORT;
$options[CURLOPT_USERAGENT] = $this->getUserAgent();
$options[CURLOPT_HTTPGET] = true; <-- this is changed*
$options[CURLOPT_RETURNTRANSFER] = true;
$options[CURLOPT_TIMEOUT] = (int) $this->getTimeOut();


* its changed from
CURLOPT_FOLLOWLOCATION TRUE um jedem "Location: "-Header zu folgen, den der Server als Teil der HTTP-Header zurückgibt. Die Verarbeitung erfolgt rekursiv, PHP wird jedem "Location: "-Header folgen, sofern nicht CURLOPT_MAXREDIRS gesetzt ist.

to

CURLOPT_HTTPGET TRUE um die HTTP-Request-Methode auf GET zu setzen. Da dies die Standard-Methode ist sollte dies nur nach einem Wechsel der Request-Methode notwendig sein.

now it works with no OPEN_BASEDIR Error :) and it shows with shortend URL from bitly or Tinyurl


I attached the modifed versions !! to copy them under ../components/com_communitypolls/helpers/

Access to viewing replies is restricted.
Showing 5 of 5 replies
You do not have permissions for replying to this topic.
Loading...
Confirm delete? This action is irreversible and the data will be deleted permanently. Do you want to continue? Confirm Add New Delete Unpublish Cancel Import Uninstall The selected item successfully deleted.
Shondalai