PHP Classes

Post a Tweet on behalf of the application creator

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  Post a Tweet on behalf of the...  >  (Un) Subscribe thread alerts  
Subject:Post a Tweet on behalf of the...
Summary:Post a Tweet on behalf of the application creator
Messages:1
Author:Mario Ruiz Santa-Quiteria
Date:2018-01-08 17:19:53
 

  1. Post a Tweet on behalf of the...   Reply   Report abuse  
Picture of Mario Ruiz Santa-Quiteria Mario Ruiz Santa-Quiteria - 2018-01-08 17:19:53
Good afternoon Manuel,

First of all, Idk if there is a similar post to this; I checked over the first 50 with no luck.

I'm quite new with using OAuth (and php in general) and maybe i did or understand something wrong.

The thing is: I want to post a Tweet using the account which I used to create the application in Twitter. Following the example script I successfully do it, but using the account I'm currently logged with. I read there is a way of tweeting some content on behalf of the application account, using the access token (and secret token). I tried to add these lines over the code

$client->get_token_with_api_key = true;
$client->access_token = 'xxxxx';
$client->access_token_secret = 'yyyyy';

resulting in the following Error: the OAuth token was already set.

Thank you very much for your time and congratulations on the awesome work you've done with this library.

Best regards.

Mario.