J7mbo / twitter-api-php

The simplest PHP Wrapper for Twitter API v1.1 calls
MIT License
1.82k stars 800 forks source link

when i try to use this library, it shows me this error. #27

Closed fasiha- closed 11 years ago

fasiha- commented 11 years ago

{"errors":[{"message":"Sorry, that page does not exist","code":34}]}{"ids":[23661767,253979844,9519542,9044112,483010616,1662412544,17316566,14915769,216892835,158415878,1688156532,282676041,512410920,272993773,1244558743,22564002,20946759,1192697377,179621064,435297265,1678989912,18764251,437715594,399300829,87297672,29706843,44124390,233262402,1610919390,170300398,341574583,971368818,17872114,42696990,447935911,19604531,293123302,177324910,166641797,174784251,52097984,43213525,77973285,1589093892,19894734,1427453509,309835298,343283519,225360831,1349512878,1556500176,14978709,14173119,1178548536,1425948607,564493814,14735313,19625601,549477794,6522872,265623200,49492914,14288063,328990309,187667664,552791239,120125810,153427757,35199327,563738194,1106314022,314836829,39494669,201172138,19963279,1300749464,798008552,521134013,114875506,37663179,1106234755,1538208510,18713086,1513560290,369627599,20272638,15527007,118730076,26539097,488690911,1530295674,14596685,132301166,81387319,141324051,293662243,323243155,989929922,1356562003,277342007,538545548,20462273,13691922,1427317880,172810945,186901523,219199596,218152771,14302901,405677179,103035472,16336998,166581053,1479205873,19857029,523249048,162565543,249913228,28346282,36161762,632527417,260317588,28111142,191479805,967731896,18581910,204258784,51404400,7972472,14154975,26099282,101758621,15632491,148811438,18309260,75591736,18949678,420396906,277042857,93731447,18018651,1347630908,12874852,1365870865,1372978358,46556494,78818627,83899714,1066072754,1252741832,225458271,19593998,987245808,46166123,44999727,1017790302,957796657,267550355,57233728,231328225,312196182,90165810,274959153,81505819,69779349,427168353,534774023,32579910,12193312,199959789,274287775,249813943,287086995,135509200,236325874,289123838,165316240,531388613,180913889,54009735,77378884,118277799,361563937,302436168,68324304,84143573,599610972,109873992,64960784,201476842,525638847,125150684,505228144,461746100,211197148,99832294,420696840,76299478,134937550,587225799,432661433,358274408,145156114,392175182,192911404,78105419,245108754,124904491,160852126,146267988,447537943,63684092,158163780,418436674,248220953,310458440,361490646,95600533,236623139,47401498,358802248,154448046,394508942,474285641,347465273,577301303,210476630,408112858,230258018,90211244,44699520,156331200,414879891,23793108,76115097,335434991,77104002,186332773,374077546,22631667,78519590,278081526,246287281,173102089,98265594,134300797,185056738,141431273,189203811,450156141,241628197,105053073,338068375,420329953,429055924,109427758,66198588,273873611,17443564,444837010,198294179,260732404,421224859,1174760586,379266792,253099765,200264942,51468750,153584204,22146581,116730042,112794452,73697954,147475591,477673878,153198641,560795230,98199395,245148841,84227763,67568323,569777244,32827888,27016772,302306688,361319204,72962300,83005854,116487905,275681652,842480802,263289572,70491224,160516682,309436690,146245362,129567972,74056455,370263357,165134778,39024721,166707323,157969551,148336333,402684487,753453692,96445137,16535378,1173195186,190230128,69614709,46961683,248414788,460504188,255549718,168421070,137804838,15449771,16083097,374630818,352266860,50671474,38144568,103462477,19290507,112546093,99345569,215885212,72901433,166090462,106468613,241993663,233114803,33836524,61961069,139756132,62179496,377675967,175924965,43766155,153177889,312081214,69330602,348676429,23730150,32518425,190055309,634079676,287308953,78402015,14769946,331122260,211332712,202349846,60670124,1022032580,173850893,173538082,235258378,181761709,155540958,143675583,75990489,85099009,107925783,147693623,302901645,245685332,342177239,885300186,574884749,423287622,79628084,565583424,79028666,471547337,239663541,297920348,109863978,187784579,198773440,73756579,65054529,305872407,29451771,58954460,60136781,221084619,67585838,589572687,322708567,94092035,121745924,94553076,207044432,154029272,44353513,323447557,97126907,201493717,162149532,133011705,25279850,318785680,139091650,127603394,91809443,377662706,518119822,26701297,294357276,56013265,22274992,396678326,174409609,137324601,34212145,255226294,467697258,19729993,78608830,216985651,480767618,74830023,93016403,28252270,133629027,33803230,355137811,99574852,282328798,116914667,125544962,264571292,287390897,110763163,308224043,82160026,111245461,111841364,145766250,139858028,269574596,1004765154,307267558,143763851,361052749,405476622,570915416,398844490,728961816,327429130,94782822,341213930,83104637,138064150,119429322,418036128,18974965,130206550,123134611,147934579,118879398,157469325,142073904,15614420,171180292,37875806,239672176,93946240,491165278,297762691,14224305,328119738,148971566,177417677,69320917,205263383,45896913,233206297,333569319,267728649,286150107,297078131,172051212,44036254,155309766,946085923,96636207,72194224,86546004,142994117,285313125,375649776,45536738,159030997,253731953,279491055,39672069,179026767,150253133,74838214,82882627,137133632,193795346,101333957,91938808,121955869,846593928,19353957,297405245,493641796,111968177,548218452,305817483,268609274,80752378,359057710,130283410,296751335,190138839,476028022,195689910,503640528,34983951,251795073,31378661,219765121,80056378,233097627,1168672226,1147512168,1167634556,1147434715,1147188768,1151696245,1175653759,1166514104,1166526084,1146823782,1148842153,1165424658,1180570033,1147003980,1180665098,1146809696,1146870686,1152731617,1163603748,1144728026,1166744347,1144748136,1166515627,1144739352,1144725620,1178600803,890811404,146954759,75210144,23313894,20207789,1117207525,550114283,488527171,469117930,204341083,27948237,968518298,373425970,19659475,182771087,36178952,256783503,20060827,115510458,166064436,20484564,30719065,24711275,274470394,281676389,229170774,987901352,288017022,961284834,957557971,109095854,23535583,15377115,916121870,918956012,123060226,21065280,608547542,101318880,97713113,875308446,176017790,274104078,75704938,17992309,374047120,551047675,611687065,39229240,223811950,787319719,582611351,825117373,56887681,804995834,357641650,717743984,223334498,41118292,380958938,47586577,22985994,607328648,565199783,566964585,565248301,578753459,607315307,579067027,578854183,580014467,577915107,579091036,565443644,574749843,566409448,565467952,564881878,569372263,630252961,14325700,25989243,563452467,40872715,119761217,605802060,41077741,278679716,32499999,246283635,44763465,161296820,28130604,567453000,464829290,541978077,554505371,226578862,217927688,48846301,502179769,95541428,23476850,389999922,120953514,242270066,33051095,527000061,40357467,25320756,119753235,484122214,181535620,406475736,259205267,49681212,65727873,16085576,447647299,216578253,173823177,376343310,35201615,27507571,255568543,101745778,21726648,49942619,36052286,286874850,54359928,181943348,18816351,84156655,353544318,392626205,26685874,22189215,15589631,258756204,51560169,359988880,355956194,21574548,181737469,49581737,91314945,56484692,28001057,18203589,238020959,111638421,23480044,93876552,33172214,42587162,35547588,130534017,52625053,119609860,13740602,59804598,53950999,95354674,17354164,70493359],"next_cursor":0,"next_cursor_str":"0","previous_cursor":0,"previous_cursor_str":"0"}

J7mbo commented 11 years ago

I need to see your code to help with this.

fasiha- commented 11 years ago

how can i shear code with you?

EwenH commented 11 years ago

@fasiha- Paste the relevant code in here. Try reading https://help.github.com/articles/github-flavored-markdown

fasiha- commented 11 years ago

==INDEX.php== <?php ini_set('display_errors', 1); require_once('TwitterAPIExchange.php');

/\ Set access tokens here - see: https://dev.twitter.com/apps/ **/ $settings = array( 'oauth_access_token' => "xxxx", 'oauth_access_token_secret' => "xxxx", 'consumer_key' => "xxx", 'consumer_secret' => "xx" );

/\ URL for REST request, see: https://dev.twitter.com/docs/api/1.1/ **/ $url = 'https://api.twitter.com/1.1/blocks/create.json'; $requestMethod = 'POST';

/\ POST fields required by the URL above. See relevant docs as above **/ $postfields = array( 'screen_name' => 'usernameToBlock', 'skip_status' => '1' );

/\ Perform a POST request and echo the response **/ $twitter = new TwitterAPIExchange($settings); echo $twitter->buildOauth($url, $requestMethod) ->setPostfields($postfields) ->performRequest();

/\ Perform a GET request and echo the response / / Note: Set the GET field BEFORE calling buildOauth(); **/ $url = 'https://api.twitter.com/1.1/followers/ids.json'; $getfield = '?screen_name=J7mbo'; $requestMethod = 'GET'; $twitter = new TwitterAPIExchange($settings); echo $twitter->setGetfield($getfield) ->buildOauth($url, $requestMethod) ->performRequest();

J7mbo commented 11 years ago

With the above code, you're doing two things:

What exactly are you trying to achieve?

fasiha- commented 11 years ago

the exactly thing i want to achieve is i just want to login with twitter.

fasiha- commented 11 years ago

http://care-24-7.com/Test/ this is my site.

J7mbo commented 11 years ago

@fasiha- This class is basically a shortcut to allow you to make requests to the REST API.

Everything you can do with the REST API is documented here.

I can't help you implement your own "login with twitter" - you could look at this link for an endpoint that may be useful.