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>

<p>It is not possible to get public posts of any user. Even for you own public posts, you need to authorized yourself with the <code>user_posts</code> permission.</p>

<p>Edit: Please donÂ´t change your question, especially when there is an answer already. CBroes answer is correct. You are not supposed to get any data of users who did not authorized your App anyway.</p>

python facebook facebook-graph-api