Welcome Guest, Not a member yet? Register   Sign In
Problems with the CI Twitter API Library
#1

[eluser]Xarem Nightslayer[/eluser]
Hi all

I use the library of Elliot Haughig (http://www.haughin.com/code/twitter) and now I can't update my twitter status with this class

My Code:
Quote:$this->twitter->call('statuses/update', array('status' => "test-tweet"));

reading the timeline or other requests aren't a problem but updating the status gives me back an error:

Quote:Incorrect signature

Can someone help me? I wrote an E-Mail to Elliot but he doesn't answer.

Thank you
#2

[eluser]Phil Sturgeon[/eluser]
The library is only one file. Why not open it up and see if you can find out where "Incorrect signature" is coming form?

Ctrl + F + common sense = solution.
#3

[eluser]Xarem Nightslayer[/eluser]
Its the Twitter API which send the error, not the class. but I dont know why. it must be a bug in the lib and I hope that anyone knows it. i searched a few hours.
#4

[eluser]Jeremy Gimbel - Conflux Group[/eluser]
To update a status on Twitter, authentication is required. Elliot's library allows for both basic and OAuth authentication. Have you set up one of those methods in your application, or are you only calling that one method?

If you look at the sample code on Elliot's site, you'll see an example of loading the library, authenticating and then making an update call.
#5

[eluser]Xarem Nightslayer[/eluser]
hi!

i authed the user using oauth, i can read the user timeline and the oauth session is stored the right way

thank you
#6

[eluser][email protected][/eluser]
Hi Guys,

I'm trying to use the Elliot Haughig library but there is something that I don't get Sad
I want to run a search and return the result on a JSON format.
My problem is that the result is return in an object Sad. COuld you tell me how to convert it? If you have an example that could be great

Thanks guys
#7

[eluser]Xarem Nightslayer[/eluser]
[quote author="[email protected]" date="1269083470"]
My problem is that the result is return in an object Sad. COuld you tell me how to convert it? If you have an example that could be great [/quote]

Hi

I made you an example:

Controller:
Code:
function search($q)
{

    $str = $this->twitter->search('search', array('q' => $q));
    
    $data["timeline"] = array();
    
    foreach($str->results as $tweet)
    {
        $data["timeline"][] = array (
                                        "screen_name" => $tweet->from_user,
                                        "text" => utf8_decode($tweet->text)
                                    );
    }
    
    $this->load->view('showtimeline', $data);

}

View (showtimeline)
Code:
<?php
foreach ($timeline as $status)
{
?>
<p><a href="http://twitter.com/&lt;? echo $status["><b>&lt;? echo $status["screen_name"]; ?&gt;</b></a> - &lt;? echo $status["text"]; ?&gt;</p>

&lt;?php
}
?&gt;
#8

[eluser][email protected][/eluser]
Thanks!!!
#9

[eluser]ironlung[/eluser]
[quote author="Phil Sturgeon" date="1268714154"]The library is only one file. Why not open it up and see if you can find out where "Incorrect signature" is coming form?

Ctrl + F + common sense = solution.[/quote]

Wow....
#10

[eluser]Noor[/eluser]
I had same problem when i try to develop on my local server.
But when I moved to online server it's working well.




Theme © iAndrew 2016 - Forum software by © MyBB