Since request "id/feed" was deprecated, I'm trying to implement Facebook feed dialog to post to user's friends timelines.
I found in documentation parameter "to", where I can define ID of the user post to.
But if I want to post one message to several friends, how can I do that?
I'm trying to use something like "user_id_1,user_id_2,user_id_3" but it does not work.
Related
I use facebook login in my app. Once the users are logged-in I can get their basic facebook info such as display name, email, and phot url.
I'd like to get their facebook friends list. I think I can get it "directly" with firebase but I don't remember how and I cannot find any info about it. I think I first have to tell Firebase to get friends list when people login with facebook, then I sould be able to get it with a method such as firebaseAuth.getCurrentUser().getFriendList().
Do you know how to get facebook friends list with firebaseAuth ?
Thank you,
Alex
It is feasible, but only the friends that also use your app. The trick is to add a scope to your login method. In Angular it looks like this
this.afAuth.auth.signInWithPopup(new firebase.auth.FacebookAuthProvider().addScope('user_friends'))
That scope at the end is the trick. Then, you need at least two users that are friends on facebook to login. You will note the popup is different as it now asks permission for the user's friends.
The response will include an access token. Then you can use that token to request the user's friends that are also using the app with a GET request like this
https://graph.facebook.com/v2.11/{facebook_uid}/?fields=friends{name,id}&access_token={access_token}
Note I'm using a particular version, but you should change that to whatever you need.
generally obtaining user's all friends list from Facebook is not possible, they removed this option years ago, with API v2.0 introduction... more info about and useful suggestions HERE
there is an official FB API called Graph API and HERE you have some doc about friend lists
and the Firebase... well, this is Google's product and it have nothing to do with Facebook... You are probably using FB mail address for creating an account in Firebase service/database, but it is keeping only this data plus some additional attributes if set (like photo or visible name).
firebaseAuth.getCurrentUser() returns FirebaseUser object, which have THESE methods - like you see: logpass, name, photo url and only few more methods. no option for getting friends list, because there is no method to set them, and no possibility to get this list from FB lib/API
I want to read my friends posts (feeds?, all posts but for a specific user only) from his user wall.
I need all (posts, feeds, statuses) that i see when i look at his page directly from the website.
I use the android sdk and i tried the graph api and rest method.
My app is registered and i have logged in facebook to get the access token (permission: read_stream)
but i dont get that infos that want to.
Please help.
Thx.
How about testing your Graph API call in the Graph API Explorer?
https://developers.facebook.com/tools/explorer/
In my case, I could get my first 10 friends' feed (wall) with the url https://graph.facebook.com/me?fields=friends.limit(10).fields(feed)
Note that I used field expansion of the Graph API.
http://developers.facebook.com/docs/reference/api/field_expansion/
You need them to actually use your app and grant full permissions via the graph API.
You cannot simply 'grab a friends wall'. You must do that via your app and it needs the permissions to do so from the user in question.
I want to integrate an android app with facebook.
I've managed to fetch friends list and to post on wall on demand (a facebook url view is loaded and the user can post on wall whatever he texts).
I want, when the app is started and the user accepts the permisions, to post a message on wall that he is started to play my game without showing that url view for posting (an automatically post)
Can someone help me?
It's probably late and maybe you've got your answer for this question.
But for anyone else who need an answer:
First, you can use the Graph API, there is an example of how to post on
a wall.
But there is a restriction!!
Facebook is not allow us to enter a prefiil message!
The content of this message must come from the user itself!
Watch this video of Facebook on Platform Policy 2.3 Example and Explanation
I am using the facebook API in my app, i know how to post message on wall. my requirement is, i want read the wall information of user recent status information through code .
How can i achieve this...
for example. from my facebook account i want to get the latest status information.
Here's a great example of using the GraphAPI to do that
https://graph.facebook.com/me/feed?access_token={}
Try it out here: https://developers.facebook.com/tools/explorer
EDIT
I stumbled across this the other day. There's a connection from the user object called statuses, which filters the stream even more than feed. As with many graph calls, you can add ?limit=N to limit the result set. So this new way I discovered would look like:
https://graph.facebook.com/me/statuses?limit=1&access_token={}
You should use a third party API such as Easy Facebook SDK. It allows you to do what you are trying to do with ease.
U should check it out here:
http://developers.facebook.com/blog/post/385/
I have not used Twitter enough to become familiar with its terminology or the way it works, so please help me in understanding the problem I have at hand.
I am getting last 20 status updates posted by some Twitter user via RSS feed, the feed XML is parsed and the statuses are displayed in a ListView. Which means that I have the original tweet in a String variable(row of ListView). When I click a ListView item, I get the option of "Re-tweeting" and "post reply".
As, I understand it, when re-tweeting I will have to just update my status as:
RT #orig-poster <original tweet>
and when posting a reply I will have to just update my status as:
#orig-poster <my tweet>
I skimmed through the JavaDocs of the Jwitter library(Twitter class) and found a setStatus(String) method. I dont think I will have to make use of retweet() or reply() functions of the Twitter class in JTwitter library.
Is my understanding correct? Please correct me if I am wrong here or missing anything.
Thanks!
Retweets and Replies are a bit more complex than simple syntax differences:
A reply has an in_reply_to_status_id field that indicates what Tweet (given by Tweet id) the submitted tweet is replying to (see http://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses%C2%A0update).
A retweet has two forms:
An 'old style' retweet which prepends an RT to an original tweet
A new sytle retweet, which calls a specific API endpoint with a Tweet id (see http://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses-retweet).
You're quite right that you can send retweets and replies just by setting your status.
If you can, use Twitter.reply() for replies, as this provides threading information to Twitter, which other clients may use to give conversational displays.
If you want new-style retweets use Twitter.retweet(). New-style v old-style is a matter of taste. New-style retweets will display as the original tweeter in the Twitter web client, and may be ignored by other clients as they're not included in the standard timeline for a user. Personally I prefer old-style, which is more reliable and allows you to add your own comment.
As others pointed out there are difference how the data is presented on Twitter. You have to use retweet() or reply() so get the full out of the API.
The terminology is correct (that's how Twitter users retweet/update their statuses) but I'm not sure about the library.
Replies and retweets can be linked back to the original tweet, so I assume this is why the API has a reply() and retweet() methods and that's why you should use those two functions.
Edit: By "linking back", I mean that, on twitter, if a tweet has been retweeted, it tells you who originally tweeted it. If a tweet has been replied to, you can view the tweet of which it is a reply.