Access to page timeline with depreciated offline_access - facebook-graph-api

I develop flash websites that feature posts from a Facebook page. Since I'm not accessing a visitor's account, I don't want them to go through the oauth process. I only want one feed in Json form, but that feed is a page and not a specific user. I've gotten around this by writing a script that I visit to grant an offline_access token. I use that token to access the one feed I need. On page load, I use the graph API Json URL to get the feed and parse the data in flash.
Now that offline_access is going away, I'm trying to find the best way to access the feed in raw json form that will work in flash.
I have read this page (http://developers.facebook.com/roadmap/offline-access-removal/), and can't find a scenario that helps me as all flows require a user to access an app of some kind. Does this change mean that I can no longer access a page feed without the process being transparent to the visitor? If need be I can be asked to be an admin of the pages I need access to, if that helps.

That document outlines all your options -
If acting as the page itself you can get a token which won't expire - Scenario 5 in the document
If acting on behalf as a user you need them to come back at least every 60 days – Scenario 2 or 3 in the document

Related

Facebook Page Likes over time

I'm not the owner of a facebook page (eg. TESLA) but I'm trying to use graph api to get the number of user that liked the pages over time. Based on graphi api documentation (insight/page_fans), I'm just getting empty json documents. Any ideas how I can get this data?
Only two page-related metrics are available publicly, page_fans_country and page_storytellers_by_country.
Everything else is only accessible to an admin user of the page, resp. using a page access token.
You can not get the data you want for pages you do not have admin access to.

Can I use a FB share dialog with a access token?

The situation
I'm developing a web tool that will be used inside a iPhone/Android app.
Inside the app the User have to log into facebook, with the FB app or a regular fallback.
We discovered that the FB session between the app and the webview was not carried over. (If you logged in on FB in the app, you still had to log in to FB in the webview)
To solve this we made the App send the access token to the webview through a POST.
In the web view I use the Graph API to fetch the users FB ID.
The ID is used in a API that the App and the webview-site uses to share data.
So far so good.
The Problem
We want to use a share dialog on some parts of the webview.
But we don't want to login again (We want to use the Access Token for this as well)
(I cannot do any changes to the App itself so I'm stuck with what I have.
A Access Token)
Tries
1) I have tried to find if it is possible to use a regular Share Dialog with a Access Token. It doesn't seem to work from the documentation.
2) It doesn't work to "login" to FB with a access token from what I can tell. No way to pass the Access Token.
3) I can't create a Share Dialog with FB.ui since that function doesn't take a Access Token.
4) Using the URL Redirection method doesn't work either because you will get a login dialog. (Since I can't pass the Access Token from what I can tell)
5) I can post directly to a users feed with fb.api() and the "publish_actions" permission. With fb.api() I can pass the Access Token to the function. But the user can't control what is being sent. I'm worried that might anger users.
I could build a custom dialog for the user and send what they wrote there. That is a last resort if no other solution is found.
When I tried to test this solution in the Graph API Explorer my FB account accused my app for spamming.. So I'm not sure this is a valid solution.
Conclusion
It seems very difficult to share content with only a Access Token.
Solution nr 5 works but I would rather use a regular share dialog.
I know that it seems impossible according to the documentation but FB are not the best at updating their documentation. So I'm hoping someone can give me a definite answer.
Resources
If I understood correctly I'm only allowed to share 2 links, since I don't have enough reputation.
https://developers.facebook.com/docs/plugins/share-button
https://developers.facebook.com/docs/javascript/reference/
you can use this.
https://www.facebook.com/dialog/share?
app_id=xxxxxxxxxx&display=popup
&href=http://google.com
&access_token=<user access token>
check your app access token first at
graph.facebook.com/debug_token?
input_token={token-to-inspect}
&access_token={app-token-or-admin-token}
check that your app has access to user public-profile
graph.facebook.com/debug_token?
input_token=
&access_token=

How do I obtain the requires access token?

Until a few days ago the Python script I was using to generate an RSS feed for my own Facebook News Feed was working fine. The script I was using first signed on to Facebook using my log in information and then called up this page and parsed it for an access token:
http://developers.facebook.com/docs/reference/api
I'm not sure that is exactly the way Facebook wants people to get an access token, but reading through all the information on Graph API I can't seem to find anything that says, "Here's how you get that token you need to access your own stuff." It all seems to be directed at people trying to do far fancier stuff.
How do I obtain an access token such that the page referenced here will return the JSON format data I need?
res = browser.open('https://graph.facebook.com/me/home?access_token=%s' % acct)
Start by reading about Access Tokens as there are different types.
Then, to read the user news feed (home connection), you need a user access_token
To retrieve one using the server-side method, you need to follow this document
To understand the flow of the server-side method you can refer to this diagram (source: Login Architecture document ):

Displaying Own Data Using OAuth2 and Google APIs with No Login

I am trying to build an application with ColdFusion.
I've been reading documentation and trying things out for days and for the life of my I can't seem to figure out how to display my own data to users from Google's APIs using OAuth2.
For example, I want to be able to display some of my stats to users with the Google Analytics API. How many unique hits, page views my site gets and from what countries. The data is private, however, so there isn't a way to do so. Or YouTube just changed their API so video tags can no longer be seen unless logged in. I want to be able to show my video tags so they can search for related things on my own site, but I can't pull them because I'm unsure of how to do this.
I know how to display and manipulate public data, but when it comes to private data, I'm at a complete loss. OAuth2 is kicking my butt!
Is there anybody that can please, please help me with OAuth2 so that I can allow my users to see my private Google data without there being any kind of log in process for them? Examples using ColdFusion would be so much appreciated.
The answer is more or less what I said at How to retrieve my own private playlist through YouTube API?
You'd want to use the OAuth 2 for Installed Applications flow, and generate new access tokens via your refresh token when your old access token expires. I'm not familiar with any libraries for doing OAuth 2 in Cold Fusion, though.

Django and Post to Facebook (no authentication)

OK, I need some help understanding the process behind Facebook's website integration process and how I can integrate it into my web app....
In its most basic form, my site stores and displays users' comments about products (there's more to it than that, but that's all that's relevant for this question). What I'd like to do is allow them to post that comment, together with the name of the product (and my site), to their Facebook wall by clicking a button.
I do not need the users to log in to my site at all, either with Facebook or any other authentication system and the Post to Facebook part is optional.
Obviously if they decide they do want to post their comment to Facebook, then they'll need to login, but I'd rather temporarily take them away from the page to login, post and then be brought back to my site.
What I need to know is how much of Facebook's APIs, Open Graph and Auth systems do I actually need to integrate?
I had hoped that I might be able to generate a simple link to Facebook with their comment embedded as a POST element...?
I'd be really grateful if someone could point me in the right direction!!
(P.S. I need a similar solution for Twitter, but I think that's easier!?!)
The Feed Dialog doesn’t allow including of a pre-set message any more, so you’d have to make that post via the Graph API if you want to pre-fill the message (and even then, you should only do so, if you’ve given the user the possibility to edit the pre-filled message first).
See here for how to make a post on a user’s behalf via Graph API, https://developers.facebook.com/docs/reference/api/user/#posts
You can do that all client-side, if you embed the JavaScript SDK into your page.
You need to set up an app on FB, then have the user connect to it (using FB.login), ask for the necessary permission (publish_stream) while doing so, and after successful login use FB.api to make the Graph API call.