twitter api(oath issue?) - 02/03/15 10:36 PM
im trying to make a latest tweet bot that uses twitters api, with lots of reading and searching i got up to this point.
the code is based on many other users but i cannot get it to work, i get this in return when its ran.
[05:19] -> *sockread* HTTP/1.1 403 Forbidden
-
[05:19] -> *sockread* content-length: 52
-
[05:19] -> *sockread* content-type: application/json;charset=utf-8
-
[05:19] -> *sockread* date: Mon, 02 Mar 2015 22:19:57 UTC
-
[05:19] -> *sockread* server: tsa_b
-
[05:19] -> *sockread* set-cookie: guest_id=v1%3A142533479782658557; Domain=.twitter.com; Path=/; Expires=Wed, 01-Mar-2017 22:19:57 UTC
-
[05:19] -> *sockread* x-connection-hash: 03f7fa03b5160fc6a49b457faebd99a2
-
[05:19] -> *sockread* x-response-time: 5
http://imgur.com/Q70uOyl (picture to api page)
i got oath info(and everything else) from that on this link
i was thinking the return would be the responce side would be what i recived when executed. any clue how to get this stuff to work and get an actual responce?
Code:
on *:TEXT:!twittertest*:#woo991: { set %target $iif($2,$2,$mid(#,2-)) set %channel # tweet } alias tweet { sockclose tweet sockopen tweet api.twitter.com 80 } on *:sockopen:tweet:{ if ($sockerr) { sockclose $sockname | halt } sockwrite -n $sockname GET /1.1/statuses/user_timeline.json?exclude_replies=true&include_rts=false&screen_name=summit1g HTTP/1.1 sockwrite -n $sockname Authorization: OAuth oauth_consumer_key="DC0sePOBbQ8bYdC8r4Smg",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1425333220",oauth_nonce="1736710918",oauth_version="1.0",oauth_token="2687440547-a2rUEIqiuySXVL2ydFUySCAhuZRaJdvGRZRJKrX",oauth_signature="uq2xqLkag0v1Gd2PJBfTpNQfbR0%3D" sockwrite -n $sockname Host:api.twitter.com sockwrite -n $sockname X-Target-URI: https://api.twitter.com sockwrite -n $sockname Connection: Keep-Alive sockwrite -n $sockname $crlf } on *:sockread:tweet:{ if ($sockerr) { sockclose $sockname | halt } var %data sockread %data if (text iswm %data) { msg #woo991 %data $2- } msg $chan sockread %data } on *:sockclose:tweet:{ unset %channel unset %target }
the code is based on many other users but i cannot get it to work, i get this in return when its ran.
Quote:
[05:19] -> *sockread* HTTP/1.1 403 Forbidden
-
[05:19] -> *sockread* content-length: 52
-
[05:19] -> *sockread* content-type: application/json;charset=utf-8
-
[05:19] -> *sockread* date: Mon, 02 Mar 2015 22:19:57 UTC
-
[05:19] -> *sockread* server: tsa_b
-
[05:19] -> *sockread* set-cookie: guest_id=v1%3A142533479782658557; Domain=.twitter.com; Path=/; Expires=Wed, 01-Mar-2017 22:19:57 UTC
-
[05:19] -> *sockread* x-connection-hash: 03f7fa03b5160fc6a49b457faebd99a2
-
[05:19] -> *sockread* x-response-time: 5
http://imgur.com/Q70uOyl (picture to api page)
i got oath info(and everything else) from that on this link
i was thinking the return would be the responce side would be what i recived when executed. any clue how to get this stuff to work and get an actual responce?