jdolitsky / AppDotNetPHP

PHP library for the App.net Stream API
34 stars 19 forks source link

Posting to app.net #1

Closed ghost closed 12 years ago

ghost commented 12 years ago

Hi,

Can you show a working example for posting a new message / reply to app.net? I have tried.. but have only gotten 401 unauthorized back. I think I am missing something as I can read streams and login. http://appeio.com

Cheers, Harold

ralfr commented 12 years ago

Same here. I think it's because the httpPost doesn't include the access token. Working on it. Find me as http://alpha.app.net/ralf

jdolitsky commented 12 years ago

you were exactly right @24z, issue should be fixed now. @hxf148 thank you for pointing this out, please let me know if you come across any other issues using the library. Cool app btw!

ralfr commented 12 years ago

May I suggest that we use App.net's preferred method and change to

curl_setopt($ch,CURLOPT_HTTPHEADER,array('Authorization: Bearer '.$access_token);
jdolitsky commented 12 years ago

@hxf148 if you re-download the code, a working example of a post would now be: $app->createPost('Hello world');

jdolitsky commented 12 years ago

@24z sure, let me test this out

ralfr commented 12 years ago

Let me know whether it works, as I cannot seem to get it working at all. At least not from my account. :-)

jdolitsky commented 12 years ago

@24z things are working for me w/ the most recent commit, try it now and let me know what happens

ralfr commented 12 years ago

Working fine for me, too. Good job!

ghost commented 12 years ago

thanks for the quick responses!