Clarity involving Graph API Permissions - facebook-graph-api

Sorry. Pretty new to this and trying to get a grasp on getting extended permissions/access_token for what I am trying to achieve.
All I need is to pull the public profile feed from someone's facebook page (returns in json format) so I can display it on said person's website. (I was going to parse this information using Jquery)
I think I understand that I will need to create an app in order to do this. Now will I need to create an app from said person's facebook account? Or is that something I can do myself, as a separate app?
Thanks for any info you can give on this.

You could in do it from both.
However im not 100% certain on if you would need any extra permissions from the target user or not. Because it is a public feed I would think not, but I haven't tried this myself so I can say for certain.

Related

Displaying my own analytics data to unauthenticated users

I am writing this question after considerable investigation into this matter.
I have gone through Google's easy dashboards (gadash JS library), superProxy and plain analytics API, and couldn't find the best solution for my needs, although I can't believe my needs are so uncommon.
This is why I am turning to you, I have got a feeling I am missing something.
My requirement:
Display my own analytics account data to users on my website, preferably with Google's chart API or ga-dash, to resemble google analytics views as much as possible.
Users will not have to take part in authentication with Google API
Each user has his own query which is built dynamically !! (this is probably why superProxy cannot work for me because I think you need to manually set the queries in advance)
I use django-python as the basis for my website
problems with solutions I tried:
GAdash library - the problem is that each user has to be authenticated, and shown their own data, meaning they need access to my profile- that's simply not what I am looking for. It works great, but only for me. On the other hand if there was a way to make my profile truly public...
superProxy - sounds like a solution for this need exactly, however I don't think that you can programmatically set the queries.
I did find a way to retrieve the data for a query on the server side using my own credential which is a bit hacky, I am still missing that JS library which will parse this XML on the client side and display it as charts.
EDIT:
I ended up using Mark's solution (embeddedanalytics), since I could not find a better, easier solution.
Other alternatives were:
1. superProxy (lacking the ability to dynamically, programmatically loading new queries)
2. gaDash library - requires authentication from each user
3. Implement my own server side querying, and display to the user with some js graphics library - which would require considerable work on my side.
Check out www.embeddedanalytics.com. This is a platform/service which will do exactly what you are looking to do (disclosure - I work with them).
We also support your requirement that each user have its own dynamically built query. This is what we call our CMS Integration version. Are you trying to create a dashboard system for a CMS system you have built?

is it possible to use Facebook Graph API to get just my own wall posts

I just want to know if it's possible to do the following:
To display some wall posts from my own facebook account in a php web page, without going through the granting-permission in the user interface level? Because from what I know, you need an access token to use the API, and to get an access token, you need to go through the granting-permission UI. So I am feeling impossible here.
I got my app ID and secret code ready, I just want to know for sure if what I want to implement is even possible to begin with.
Actually, you could change your privacy permissions so that your wall is completely public. The API is then able to access public information without being granted user authorization.
I was also searching the same, as I want to implement it in my project. Now I've got the answer of this. Yes, you can get posts as well as comments from your wall. If you want more details about same, comment below mentioning my name. :)

How To Get List Of Apps A User Has Used

I was hoping to use the Graph API to retrieve a list of apps that the user currently has on their account - those that they are using or have used, and have not yet removed. This would be the same list as found by clicking App Centre and My Apps.
I'm not looking to get info about a specific application (yet; I don't know what app to look at, or how to get its ID).
This article: How to get the List of Facebook Applications for a user using Graph API
seemed to be the right answer (and the OP certainly liked it), but for me, while it works, it returns an empty array - but I have about 20 apps (mostly games) listed on my profile, half of which are in favourites. I don't need to know which are in favourites; I simply would like to know what apps a user is interested in.
I realise this is considered sensitive information, but since I cannot find what string to use for the api() method, I can't tell what permissions I'll need; I currently ask for read_stream but since the call itself succeeds, I assume I have sufficient privilege.
I see that you can list the app requests using /me/apprequests, which suggests you should be able to retrieve the list of apps (that's where the requests come from, usually, except invites to new games) - but I can't find anything that seems right.
Any ideas?
Thanks.
No, it is not possible to retrieve a full list of the applications that a user has TOS'ed.
As described in the comments to the OP, it is possible to deduce some of them from /[user]/scores assuming they have granted the user_games_activity permission.

HTML5 Canvas to Facebook

I've made a basic HTML5/JS comic creation tool that uses the canvas element.
I want users to be able to upload their comics via the Facebook API.
I don't believe Facebook allows posting images in the form of base64 strings from the canvas.toDataURI() method, and don't want to use my own server to convert these images & temporarily store them.
What's the best way to go about this? Possibilities I've wondered about: Convert canvas to blob? Store blob via web service (if so, suggestions?) Upload blob directly to Facebook? (Is that possible?)
I don’t see why this should not be possible doing a „normal” upload. You can create a new photo for a user by posting to PROFILE_ID/photos, with a source parameter of type multipart/form-data.
So first thing I’d try is getting the picture info from the canvas object into a „normal” form (writing it into a input element in the right format(?)), and sending that to Facebook. If this step succeeds, I’d see if jQuery or some other lib’s form.serialize method can build requests of type multipart/form-data. If that’s also possible, then there should be no further problem in taking the data in that format and posting it using FB.api (although you might want to tell your users to be patient, because that might take a while).
Can’t tell for sure if this’ll work, but I’d give it a try.
Facebook partners with Heroku for free app hosting, you can use it as the temporary server.

Django url image extraction like facebook

Does anybody know if there is a pluggable app that you can use to achieve url like image extraction for Django?
I dont know if there is a pluggable app that will do this for you, but you can probably hack this together yourself.
The only 'standard' I know of that facilitates this is oEmbed (http://www.oembed.com/) which basically works this way:
somebody gives you a URL.
you read it, find that its a valid JSON that matches the oembed structure
success!
other than the above, and what I think facebook does as well (since I took a look at a few sites that both twitter and fb would work with and none have any oembed support that I can see), is to work on a case by case basis. They probably had a developer go through a large variety of sites and look at the type of meta tags available. for example, yfrog has a bunch of meta properties that tell you the url directly to the main image being displayed, the owner, the tweet that went along with the image, etc. After that it's best effort guesswork. that's why when you try to share a blog post on facebook, it'll often give you the option of any one of the images that went with that blog post, because it doesn't know which one is the main one.