<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Trouble with get follow Twitter Reply API</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=4069434" />
  <subtitle>Trouble with get follow Twitter Reply API</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=4069434</id>
  <updated>2013-05-19T01:18:13Z</updated>
  <dc:date>2013-05-19T01:18:13Z</dc:date>
  <entry>
    <title>RE: Trouble with get follow Twitter Reply API</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4101972" />
    <author>
      <name>Brett Bandy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4101972</id>
    <updated>2011-06-22T23:14:03Z</updated>
    <published>2011-06-22T23:14:03Z</published>
    <summary type="html">[quote]Is it possible that the users in the request are protected users?[/quote]
 
Yup, you nailed it!   One of the users I was testing with is a protected user.  Once I started using a different user, not being followed, I received a successful response with friends = false.
 
thanks,
Brett Bandy
 </summary>
    <dc:creator>Brett Bandy</dc:creator>
    <dc:date>2011-06-22T23:14:03Z</dc:date>
  </entry>
  <entry>
    <title>RE: Trouble with get follow Twitter Reply API</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4104802" />
    <author>
      <name>Mark Rzasa</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4104802</id>
    <updated>2011-06-22T20:47:20Z</updated>
    <published>2011-06-22T20:47:20Z</published>
    <summary type="html">Hi Brett,

You are interpreting the API correctly.

It is possible that there is something subtle going on here. Is it possible that the users in the request are protected users? There are some notes on the following Twitter API page.

http://dev.twitter.com/doc/get/friendships/exists

Take the following scenario:

usera: protected
userb: protected
usera follows userb
userb does not follow usera

The following request:

http://&lt;host&gt;/ccp-webapp/ccp/reply/twitter/friendships/exists?user_a=usera&amp;user_b=userb&amp;account_user=usera

will succeed (return true in the friends field of the progress message) because usera is following userb.

This request:

http://&lt;host&gt;/ccp-webapp/ccp/reply/twitter/friendships/exists?user_a=userb&amp;user_b=usera&amp;account_user=userb

will fail (return 403 in the httpResponseCode in the progress message) because userb is not following usera.

If you modify the request to the following:

http://&lt;host&gt;/ccp-webapp/ccp/reply/twitter/friendships/exists?user_a=userb&amp;user_b=usera&amp;account_user=usera

The request will succeed, and false will be returned in the friends field.

Please let me know if this matches your scenario. My testing with this scenario yielded the same results as what you saw in your tests.

-Mark</summary>
    <dc:creator>Mark Rzasa</dc:creator>
    <dc:date>2011-06-22T20:47:20Z</dc:date>
  </entry>
  <entry>
    <title>RE: Trouble with get follow Twitter Reply API</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4101154" />
    <author>
      <name>Brett Bandy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4101154</id>
    <updated>2011-06-22T18:55:03Z</updated>
    <published>2011-06-22T18:55:03Z</published>
    <summary type="html">[quote]Method: GET
URL: http://&lt;host&gt;/ccp-webapp/ccp/reply/twitter/friendships/exists?user_a=&lt;usera&gt;&amp;user_b=&lt;userb&gt;&amp;account_user=&lt;account_user&gt;[/quote]
 
I tried the new url, but it seems to be working only when user_a is following user_b.   In this case it returns the expected response and indicates that user_a is indeed following user_b
 

&lt;TwitterProgress&gt;
  &lt;httpResponseCode&gt;200&lt;/httpResponseCode&gt;
  &lt;httpResponseMessage&gt;OK&lt;/httpResponseMessage&gt;
  &lt;progress&gt;SUCCEEDED&lt;/progress&gt;
  &lt;rateLimited&gt;false&lt;/rateLimited&gt;
  &lt;twitterStatus&gt;
    &lt;friends&gt;true&lt;/friends&gt;
  &lt;/twitterStatus&gt;
&lt;/TwitterProgress&gt;

 
However, if I try the same thing where user_a isn't following user_b I get back a response that indicates an error.  
 

&lt;TwitterProgress&gt;
  &lt;httpResponseCode&gt;403&lt;/httpResponseCode&gt;
  &lt;httpResponseMessage&gt;Forbidden&lt;/httpResponseMessage&gt;
  &lt;progress&gt;FAILED&lt;/progress&gt;
  &lt;rateLimited&gt;false&lt;/rateLimited&gt;
&lt;/TwitterProgress&gt;

 
I was expecting the request to succeed, but the friends element value to be false.    Am I interpreting the API correctly?
 
thanks,
Brett Bandy</summary>
    <dc:creator>Brett Bandy</dc:creator>
    <dc:date>2011-06-22T18:55:03Z</dc:date>
  </entry>
  <entry>
    <title>RE: Trouble with get follow Twitter Reply API</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4084553" />
    <author>
      <name>Mark Rzasa</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4084553</id>
    <updated>2011-06-20T01:06:05Z</updated>
    <published>2011-06-20T01:06:05Z</published>
    <summary type="html">Hi Brett,
 
We have an error in our documentation. The method and URL to determine if one user is following another is as follows:
 
Method: GET
URL: http://&lt;host&gt;/ccp-webapp/ccp/reply/twitter/friendships/exists?user_a=&lt;usera&gt;&amp;user_b=&lt;userb&gt;&amp;account_user=&lt;account_user&gt;
 
I'm sorry for the inconvenience.
 
-Mark
 
[quote]Whenever I GET the get follow api it returns 405 Method Not Allowed.  The reply says POST and OPTIONS are allowed, but the API doc says you're suppose to GET when querying to see if user a is following user b.
 
 
Here is the url being used...
 
GET (doesn't work)
http://&lt;host&gt;/ccp-webapp/ccp/reply/twitter/follow?user_a=&lt;usera&gt;&amp;user_b=&lt;userb&gt;&amp;account_user=&lt;usera&gt;
 
I've tried with and without the account_user parameter, but still receive the same 405 error code.  I'm able to POST using the URL to follow a new user, just not query for an existing follow relationship.
 
POST (works)
http://&lt;host&gt;/ccp-webapp/ccp/reply/twitter/follow?account_user=&lt;usera&gt;&amp;user_to_follow=&lt;userb&gt;
 
thanks,
Brett[/quote]</summary>
    <dc:creator>Mark Rzasa</dc:creator>
    <dc:date>2011-06-20T01:06:05Z</dc:date>
  </entry>
  <entry>
    <title>Trouble with get follow Twitter Reply API</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4069433" />
    <author>
      <name>Brett Bandy</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4069433</id>
    <updated>2011-06-17T00:49:53Z</updated>
    <published>2011-06-17T00:49:53Z</published>
    <summary type="html">Whenever I GET the get follow api it returns 405 Method Not Allowed.  The reply says POST and OPTIONS are allowed, but the API doc says you're suppose to GET when querying to see if user a is following user b.
 
 
Here is the url being used...
 
GET (doesn't work)
http://&lt;host&gt;/ccp-webapp/ccp/reply/twitter/follow?user_a=&lt;usera&gt;&amp;user_b=&lt;userb&gt;&amp;account_user=&lt;usera&gt;
 
I've tried with and without the account_user parameter, but still receive the same 405 error code.  I'm able to POST using the URL to follow a new user, just not query for an existing follow relationship.
 
POST (works)
http://&lt;host&gt;/ccp-webapp/ccp/reply/twitter/follow?account_user=&lt;usera&gt;&amp;user_to_follow=&lt;userb&gt;
 
thanks,
Brett</summary>
    <dc:creator>Brett Bandy</dc:creator>
    <dc:date>2011-06-17T00:49:53Z</dc:date>
  </entry>
</feed>

