Getting users news feed from Facebook - php

In my portal, I have added user login and getting user profile information from facebook.
My next target is to get the news feeds which appear on the home page of user. I refered to this question but the accepted answer said it is not possible. Is it really not possible or there is a way to do it in present fb api?

The accepted answer at How to get user's news feed via graph api was over a year ago, whereas the other answer is 5 months ago. As documented at https://developers.facebook.com/docs/reference/api/user/#home , the usage https://graph.facebook.com/me/home works, which I tested in the API Graph Explorer Tool and it worked. Let me know if it works for you :)

Related

post in facebook wall publicaly using graph

. i want to post inside my fb wall as public post
before i post my question here i check all provided and similar questions that Stackoverflow provide
they are all old & fb is update their api graph every year or even every months
please help:
i'm using some code ...
it's work for me but unfortunately it's post as a private & not as public.
You can't post to a personal profile at all since 2018, and there's no privacy setting for Page/Group posts... so this isn't going to work. If others aren't seeing your posts, it's because your app is in development mode instead of being live.

How to Convert Facebook fake user id to real user id [duplicate]

This question already has an answer here:
Facebook API: How to get the FB login user's unique ID? ID from API doesn't match 'real' user ID in v2.0
(1 answer)
Closed 8 years ago.
I am building a Facebook app that will return users who like a product that a business would offer. I am using the Facebook Query Builder located here https://github.com/SammyK/FacebookQueryBuilder to do all of this.
The app is using the Facebook Graph Search API to return pages that match a certain search criteria. Then it looks at who has liked the recent statuses of that page, making them a "warm" lead. I get back a fake ID of a user. Test it out for yourself.
If you go to Facebook / 684351765016845 you will be redirected to facebook / arturo.valencia.37
But the real facebook user id is : 100003260838219 not 684351765016845.
I need to get either the real facebook user id or the user name which is what Facebook redirects to. I've even tried logging in with a curl request and trying to let it redirect me like that is shown here
php get url of redirect from source url
I'm not exactly sure what I need to do. Any help is appreciated.
You can see my test app and the results I get back located here :
http://104.131.178.30/ryan/
Any and all help is appreciated.
Since April 2014 (v2.0 of the Graph API), it´s not possible to get the "real" ID anymore, you only get an "App Scoped ID". It´s not a fake one, it´s unique in that specific App so you can still use it to identify returning users.
It´s not possible to get the "username" either anymore, as it would allow someone to get the real ID.
Check out the changelog for more information: https://developers.facebook.com/docs/apps/changelog

How to post invitation on friend's wall after Facebook breaking change on Feb 6 2013?

Firstly, I actually spent a lot of time to search for the answer but I still cannot find a proper solution, so I decided to post a question here, hopefully some one can provide me at least ... some hints.
My problem is:
According to Facebook road map, There's a change in "Removing ability to post to friends walls via Graph API ", this affects an inviter project which I'm currently working on for my company. Now, I cannot post invitation on friend's wall, this will make our app completely useless.
I tried to figure out 2 solutions as below:
Using Facebook Graph API to post a feed on my wall and tag the friend that I want to invite on that feed. This solution works fine but it will post thousand of feeds on wall and it is not good.
Using Facebook Chat XMPP I sill cannot manage to make it work. But by using this, there's a high change that our application can be banned by Facebook because of spamming.
My question is: Besides 2 solutions above, is there any better way to post invitation on friend's wall?
If there's no other solution, can anyone tell me how to post a feed that is hidden from timeline using GraphAPI? (For timeline not be polluted by invitation feed)
Now, I cannot post invitation on friend's wall, this will make our app completely useless.
Maybe you were not supposed to “spam” walls for the purpose of inviting people in the first place … and that loophole is being closed now.
Requests/Invites are the mechanism you’re supposed to be using for stuff like this: https://developers.facebook.com/docs/requests/

Facebook, check if user is a fan and logged in using PHP

I have searched the Internet and SO for over a week, but have not managed to find anything yet so allow me to ask a question which has already been asked loads of time on SO, but for which none of the answers seem to be working for me.
I have a website and a Facebook page. On my website I have the usual Facebook "Like me" box. As I want to show some extra content to my fans when they visit the website - and encourage non-fans to become a fan - I would like to know if it is possible, via PHP, to:
1. Understand if the user is a fan
2. Understand if the user is logged into Facebook
What I would like to be able to do is send a PHP request to Facebook and receive one of the following three answers: "is a fan", "not a fan", "not logged-in/not a Facebook user".
In the first case I would show the fan-only content, in the secon case I would try to encourage the user to become a fan, while in the third case I would not do anything as I'm not sure the user is a Facebook user.
Please note:
1. I do not need any further identifying information
2. There is no app involved here, as users are fans of my page, although I could build one if necessary
Some answers on SO seem to point to this tutorial, but as my page is not an app, I cannot really use this solution:
http://www.masteringapi.com/tutorials/facebook-api-check-if-a-user-is-fan-of-a-facebook-page/20/
Unfortunately Facebook's APIs won't tell you if the user's logged in or if is a fan of your page until you make the user install your Facebook app (and for the likes you will need user_likes permission too).
The only kind of exception is that when you are running a page tab. At the time facebook embeds your content via an <iframe>, the signed_request POST parameter that comes with it will tell you if the user is a fan or not. You can read about the signed request's here..

Posting to a Facebook (fan) page wall

I have a blog (wordpress) and a facebook fan-page for my blog (with more than 1 fan!). I would like to post a message to my FB wall, every time I post something on my blog. Preferrably PHP.
The same question is already asked here, but this question isn’t going anywhere. The question dates from march, but Facebook has updated their API since. The FB documentation gives three different methods for posting to the wall, but I cannot figure out which is the easiest/best one to use.
Does anyone have a link to a full tutorial or a short walktrough how to get this done?
(Currently, I’ve got the Ping.fm app setup, who gets its data from twitterfeed. The drawback is that the links get shortened, and Facebook cannot get the first picture and full title.)
API posting to a Facebook Fanpage (not sure if it is to wall specifically) success claimed (and explained in reasonable detail) over on this comment:
http://getsatisfaction.com/pingfm/topics/posting_updates_to_facebook_fan_pages_api_supports_it#reply_1038558
Why not use the standard "Imported Sites" feature that reads your blog's RSS feed? Get to it from Wall -> Options (below share box) -> Settings -> Blog/RSS under Imported Sites.
See http://www.tech-recipes.com/rx/2885/facebook_import_blogs_rss_feeds_without_third_party_applications/ for more information.

Categories