[twitter-dev] Friendship/Create usage

2010-07-12 Thread lu5ceh
i trying to use friendship/create API function and isnt works


//--
define('BOT_UID', '150359788');

$result89 = $connection-post('friendship/create/'.BOT_UID);

//---

is this the correct usage?


Re: [twitter-dev] Friendship/Create usage

2010-07-12 Thread Matt Harris
Hi,
You need to include the format for the response in the request. We recommend
using the explicit version of the request though. For example:
  /friendships/create.json?user_id=150359788

More information is available on our developer resources site:
http://dev.twitter.com/doc/post/friendships/create/:id

Hope that helps,
Matt

On Mon, Jul 12, 2010 at 2:07 PM, lu5ceh ignacio.santo...@gmail.com wrote:

 i trying to use friendship/create API function and isnt works


 //--
 define('BOT_UID', '150359788');

 $result89 = $connection-post('friendship/create/'.BOT_UID);

 //---

 is this the correct usage?




-- 


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris


Re: [twitter-dev] Friendship/Create usage

2010-07-12 Thread Abraham Williams
You are missing the *s*. Try:

$result89 = $connection-post('friendships/create/'.BOT_UID);

Abraham
-
Abraham Williams | Hacker Advocate | http://abrah.am
@abraham | http://projects.abrah.am | http://blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.


On Mon, Jul 12, 2010 at 14:07, lu5ceh ignacio.santo...@gmail.com wrote:

 i trying to use friendship/create API function and isnt works


 //--
 define('BOT_UID', '150359788');

 $result89 = $connection-post('friendship/create/'.BOT_UID);

 //---

 is this the correct usage?


[twitter-dev] friendship/create, and OAuth?

2009-10-04 Thread Fahim

When I issue a friendship/create request  using OAuth authentication,
I seem to get a 404 error. The same request sent using basic
authentication appears to work correctly. Is this a known issue or
something new that has not been encountered by anybody else before?

I've tested other OAuth requests (status updates, timeline requests
etc.) and they all work fine. So this is not an OAuth issue as far as
I know.

Anybody else encounter something similar and perhaps know of a
workaround?

Regards,

Fahim


[twitter-dev] Friendship Create

2009-04-27 Thread Paul Kinlan
Hi Guys,

I am developing some oauth support for http://www.twollo.com and I am having
some trouble with friendships/create  I keep getting 500 errors from
twitter, I am pretty sure that I have got the oAuth sorted ok, I am doing a
POST to the service, my app is allowed to write to a profile.

Bellow is an example query.

http://twitter.com/friendships/create.xml?screen_name=twollooauth_nonce=71594710oauth_timestamp=1240867081oauth_consumer_key=oauth_signature_method=HMAC-SHA1oauth_version=1.0oauth_token=xoauth_signature=

Anyone else seeing problems on friendships/create and oAuth?

I also tried (with the same result)
http://twitter.com/friendships/create/twollo.xml?oauth_nonce=71594710oauth_timestamp=1240867081oauth_consumer_key=oauth_signature_method=HMAC-SHA1oauth_version=1.0oauth_token=xoauth_signature=

As always, I am completly open to me causing the problem :)  I am using
TwitterOAuthClient (python) for my oauthy goodness.

Kind Regards,
Paul Kinlan


[twitter-dev] Friendship/Create produces this error: This method requires a POST.

2009-03-12 Thread benr

I'm trying to write a function that will follow a user via the API
using PHP/curl. I believe I have setup correctly using curl to POST to
twitter, but I keep getting the following error: This method requires
a POST..  Here is my code:

$url = 'http://twitter.com/friendships/create/'.urlencode
($id).'.json';
$postargs = 'id='.urlencode($id);

$ch = curl_init($url);

curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postargs);
curl_setopt($ch, CURLOPT_USERPWD, $this-username.':'.$this-
password);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_NOBODY, 0);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, $this-user_agent);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $this-headers);

$response = curl_exec($ch);

$this-responseInfo=curl_getinfo($ch);
curl_close($ch);

All the values appear to be valid. I'm able to update my status using
the above script (different url of course) and other actions, the only
one I'm having trouble with right now is friendship/create.  Am I
missing a CURL opt?