What actually get_Object() takes as a parameter in Fabook SDK?
<p>I want to send friend name as a user in <code>get_object()</code>in below code for getting his public posts. But I am getting error</p>

<blockquote>
  <p>raise GraphAPIError(result)
  facebook.GraphAPIError: (#803) Cannot query users by their username (tayyab.rasheed.545)</p>
</blockquote>

<pre><code>user = 'tayyab.rasheed.545' #is giving error
#user = 'BillGates'         #is working fine.
# user = 'me'               #is working fine.

graph = facebook.GraphAPI(access_token)
profile = graph.get_object(user)
posts = graph.get_connections(profile['id'], 'posts')
</code></pre>

<p>Why is the error? I think I am doing something wrong. <code>BillGates</code> and <code>me</code> is working fine then why not <code>tayyab.rasheed.545</code> Profile of friend is '<a href="https://www.facebook.com/tayyab.rasheed.545" rel="nofollow">https://www.facebook.com/tayyab.rasheed.545</a>'</p>

<blockquote>
  <p>Why is the error?</p>
</blockquote>

<p>Because Facebook removed the username field from the API with v2.0, and as the error message says, you can not query user profiles by their username any more.</p>

<blockquote>
  <p><code>BillGates</code> and <code>me</code> is working fine then why not `tayyab.rasheed.545</p>
</blockquote>

<p><code>BillGates</code> simply is a Facebook <em>Page</em>, and not a user profile.</p>

<p>(And <code>me</code> has nothing to do with the username in the first place.)</p>

python facebook facebook-graph-api