I need to read facebook timeline but I don't know how I can do. I don't find anything!! I use this library:
https://github.com/facebookarchive/facebook-php-sdk
Anyone can help me to suggest a tutorial or other something?
Here you can access the FB Developer pages.
They have examples and manuals for a variety of programming languages and tools.
Here's a few things you will need in order to read an FB timeline:
Facebook assigns a unique and fairly long ID to any account, whether profile or fan page. Users, however, don’t use this ID to identify pages. So the first thing to do in order to read a timeline is match the public name of the page (or user) to the underlying Facebook ID.
Getting the ID of the account for which you intend to read the timeline is only the first step. You also need to be authenticated to access the feed.
Once acquired, the access token can be saved to a cookie and used for every further operation until it expires.
You can find the whole article on this link.
There are a few code examples on the page as well written in C#.
Hope this helps.
Related
I am a PHP developer who was asked by a client to update their Facebook business page with changing statistics. Not by posting the information as status updates at an interval, but to update the Facebook page description like AJAX would update a page view counter. Is this possible? Can you point me in the right direction of how to implement this?
You're going to need to authenticate your application (this is also good reading here) and ask for extended_permissions, specifically the manage_pages permission.
This allows your application to login as a page.
Then you can modify certain parts of the page attributes.
There is a nice class available on phpclasses.org to aid in logging in with facebook, though their own PHP SDK is really nice when you get used to it.
Good luck!
I have a protected twitter account but I want to be able to show a list of my most recent tweets on my website.
I'm prepared to dive in to the twitter docs but I just wanted a heads up to know if its possible?
Would my script have to autenticate with my account or is there a way to allow access to my twitter account from a particular IP?
Thanks
Yes, definitely possible. I don't know if there is a simpler solution, but one way would be to create a new app on Twitter which your account authorizes. In the authorization process, Twitter will give you access tokens for your specific account. Store your access tokens in a database. Read your tweets from a PHP widget say, which uses the Twitter PHP API, and uses your access tokens to display it.
When you are retrieving your tweets, it doesn't matter if it is protected or not as long as you have authorized that specific application.
Simply put, the widget that displays your tweets is a Twitter application that you have authorized. (one-time authentication)
Well I don't think so you can read anything from Protected account.
I was reading few articles about the same issue and here is the alternative solution if you would like to give a try. (I personally didn't tried it so leaving up to you to give shot)
http://www.ehow.com/how_6474863_protected-twitter-updates.html
This might be an easy question, but I'd like your help with this. I couldn't find a solution on stackoverflow neither with google, probably cause I don't know what to search.
I'm using the facebook API for some purposes. Users who are visiting the page, need to login with facebook and give standard access to there profile. The only thing I store at the moment is there facebookid.
The issue:
On this page I need the amount of friends (just the countnumber) from the last users who visited the page. (for some purposes) To bad the friends are not publicly accessible.
What's the best solution to retrieve this?
Storing the access token (is this still possible in a way?) and get friends with graph.facebook.com/-id-/friends?access_token=...
Is there another way to get count of friends?
I'd rather not save the amount of friends in the db, cause this is not accurate.
Thanks in advance!
You need to collect offline_access extended permission. And then to access other friend data, please cllect the friend_* extended permissions listed in the following SO url
Facebook Graph API - get friends info
Hope it will help.
Last December, I set up an app for a client who wanted to pull their public facebook posts into the footer of their website.
I was using this URL to pull the message, create time and permalink and when I wrote it, all was good:
http://api.facebook.com/method/fql.query?query=SELECT%20message,%20created_time,%20permalink%20FROM%20stream%20WHERE%20source_id=138631878804%20AND%20message%3C%3E%27%27%20limit%203
Today they reported that it was no longer pulling their information. I put that url into a browser and the result is "Requires valid signature"
I've gathered from google that I need something called an access_token, also I've seen where I can use the php sdk but then I need an appId and a secret token.
At this point, I've read so many different sources that I am thoroughly confused. The FQL query above represents the full extent of my Facebook programming experience. It looks like maybe I want the Graph API, but I don't want anyone to have to sign into anything.
Can one of you guys who are more versed in the voodoo of facebook nudge me in the right direction to do this:
From PHP, pull public messages from the stream table without forcing a user to log into facebook.
Thanks!!
To pull posts from a publicly visible Page on Facebook, you can use any valid access token. For most sites managing a page, this will be a page access token retrieved via one of the page's admins authorising your app to have access to their pages, but that might be overkill for your use-case.
Probably the quickest solution is to just create a new App ID for the site, get the app access token for that App (see 'App Login' on https://developers.facebook.com/docs/authentication/ ) and then use that access token to retrieve the posts.
I found several links all from a simple Google search.
Duplicate question: https://stackoverflow.com/questions/3298836/how-you-get-access-tokens-for-facebook
http://benbiddington.wordpress.com/2010/04/23/facebook-graph-api-getting-access-tokens/
https://developers.facebook.com/docs/authentication/
When posting to the page wall (feed) through my application, under the post contents facebook adds '20 minutes ago *via my_app*'. This is a problem for my company, since they don't want the fans knowing the posting is done through an application, thus losing the personal touch.
Is there any way to lose the '*via my_ap*p' part of the post? These are some of the things I have tried:
I have given every possible permission on the page admin user, including 'manage_pages'
Have tried with the token returned from graph api me/accounts for that page / Impersonating pages
Please tell me, short of making a bot to do the whole thing, is there any way to do this through the facebook api.
Thank you for any help you can provide.
If you don't want the people to see which company you are, then Facebook is the wrong platform for you!
I'm pretty sure, you also would violate the terms of Facebook (Developer).
See what your competitors are doing. The largest company in this business has named their app "Publisher". When users click on this a page will open up that doesn't say anything about who created the app - actually it doesn't say anything at all. You could also use the name "Publisher" for your Facebook publishing app - in Facebook app names don't have to be unique.