Welcome to Law-Forums.org!   

Advertisments:




Sponsor Links:

Discount Legal Forms
Discounted Legal Texts


What is wrong with my php code ?10 points for the right answer?

Discuss anything relating to Consumer Law

What is wrong with my php code ?10 points for the right answer?

Postby patwin87 » Fri Dec 16, 2011 4:20 pm

Ok, so I am trying to pull my list of friends from twitter using the Twitter API with PHP , I got this code from git hub and I am ALSO very familiar with PHP but for some reason , it is not displaying my friends from twitter .. Could you please tell me where I might have done wrong ? thanks a bunch
<?php
include 'lib/EpiCurl.php';
include 'lib/EpiOAuth.php';
include 'lib/EpiTwitter.php';
include 'lib/config.php';

$twitterObj = new EpiTwitter($consumer_key, $consumer_secret, $_COOKIE['oauth_token'], $_COOKIE['oauth_token_secret']);

$twitterInfo= $twitterObj->get_statusesFriends();
echo "<h1>Your friends are</h1><ul>";
try{
foreach($twitterInfo as $friend) {
echo $friend->screen_name;
}
}catch(EpiTwitterException $e){
echo $e->getMessage();
}
?>
patwin87
 
Posts: 43
Joined: Fri Apr 01, 2011 4:31 am

What is wrong with my php code ?10 points for the right answer?

Postby rickie » Fri Dec 16, 2011 4:21 pm

Visit http://ethan.jrcw3.com in a day or two: it does (will do soon) what you want, for Facebook, Twitter, Tumblr, Y!A, MSN and Youtube.
(You can sign-up, but don't go any further: I am working on the streaming of functions)
Try to login with "albatros"/"pwdpwd" and check "my network".
Click on Twitter: it shows extracts of the friend "albatros" has on twitter.
The functions to SET-UP your accounts with all social networks ("My account") are in re-writing, so don't try them! (you will just see messages exchanges, raw codes.)

If this is what you are looking for, once the libs will be re-organised, the "developer" section will allow you to use the functions I have reviewed. This includes OAuth V1 and V2.
One of the reasons for the re-write is that EVERY social network has its OWN OAuth and libraries. I want to end-up with ONE OAuth and ONE tiny lib for each network (calls to APIs are different for each network, but many have commonalities that will be included in the OAuth.

The "when"? I don't know: these are masses of code and it is very messy at this time :-)
rickie
 
Posts: 49
Joined: Fri Apr 01, 2011 5:11 am

What is wrong with my php code ?10 points for the right answer?

Postby charlot22 » Fri Dec 16, 2011 4:35 pm

I don't know
charlot22
 
Posts: 44
Joined: Sat Apr 02, 2011 10:36 am


Return to Consumer Law

 


  • Related topics
    Replies
    Views
    Last post