Facebook API, single user feed? - javascript

I haven't had the chance to work with (any) Facebook APIs, I want to create a simple app that will only list posts from a single (specific) FB user, so I don't want to create login for bunch of users.
I just want to have an app that will list everything that a certain person posts on his FB. Is this possible and can someone point me to the right direction? I'll either do it with Node or Rails. Thanks!

I would use koala, simply get an (your) access token from the Graph API Explorer and start exploring. You shouldn't have any issues returning your feed. Koala handles FB's API pagination for you and everything else.

Related

Automatically access my Google Analytics and display chart publicly on my website

I'm having some difficulties in figuring out the best way to do this:
Using Google Analytics API, or similar Google API, I would like to track a user's activity from the moment they access the page until they reach an end page, which is gonna show them back some charts with THEIR activity on my website. (Nothing too detailed, just how long they've been on each page, how many session etc.)
So far, I've managed follow the Embed API example to access THE USER's Google Analytics account and draw a chart by asking for permission, however when it comes to showing data from MY account I just can't seem to figure it out.
I want my website to automatically use my account (or service account) and draw some charts from my google analytics data and show it to every user.
What would be the best way to approach this? I've read something about access tokens but I don't know if that's the solution. Moreover, my hosting is a shared host and I don't think it allows installing Python Modules like in this example.
Cheers for the help!
If you want to show the user your data, you will have to perform the authentication on the server side. There is no way around this. It is after all, your account's data that they are accessing.
If you are unable to install Google's client library, you need to:
Get an access token using cURL (see how here)
Use that access token to perform server side authentication for the user (see how here)
The user should now be able to access your site without logging in, and see YOUR data.

How to configure OAuth with Goodreads

I am building an app using HTML, CSS, and Javascript, and am trying to configure OAuth to use it to access data from the Goodreads API. I basically want to get a list of books that a Goodreads member has read in the current year and display statistics about the metadata of these books. I'm pretty new to Javascript and using API's and don't have a super good grasp on OAuth and API authentication in general so I would really appreciate it if it could be explained as simply as possible.
From what I understand I need to create a login button on my page that contains a link that looks something like this:
http://www.goodreads.com/oauth/authorize?oauth_token=SCDMymQWcIE8GnxmSA
When the user clicks this button they'll visit goodreads.com where they'll login to their account. After accepting the permissions, the user will be redirected to back to your site along with an access token that would contain the user's ID. At this point I would use the user ID to pull data about the books on their shelves.
I'm not really sure how to go about writing this in my Javascript file though. How do I go about authorizing via OAuth and storing the user's ID? From the Goodreads Developers group it seems like the Goodreads API uses OAuth 1.0 which I believe is relevant to how I will need to approach this.

Facebook Graph API to access Groups

I am seeking some advice, I want to use the Facebook API (V2.7) to simply access the events listed under a private group that I am an admin of. I've read the docs and it seems weird to me that you need to setup an app in order to do this, especially as I am the only person using the app.
If anybody else has any experience could they shed some light here? To iterate I want to make an API call to the Facebook Graph API to simply get a list of all events that the group has listed.
The whole App VS access token isn't too clear to me either (fairly new to Facebook API)

Twitter search API authentication error

I need to build a simple web application that gets live data from an API, such as twitter search. I am reading about how to go about this in Javascript (I am not allowed to use jQuery for this assignment). Let's say I want to gather tweets about Bernie Sanders. I just want to see the JSON data in my browser window, but when I paste in the link hit enter, I get the error:
{"errors":[{"code":215,"message":"Bad Authentication data."}]}
The link I used was https://api.twitter.com/1.1/search/tweets.json?q=Bernie%20Sanders&src=typd. From what I have read, it has to do with 1.1 and Oauth, so I registered an application on twitter and jotted down the consumer and access keys, but I am not sure what to do with them. I really do not know where to begin. If someone could point me in the right direction, I would greatly appreciate it.
You have to follow the OAuth 1.0 Protocol.

Facebook - fb graph api js sdk giving wrong response for user-id

I'm using facebook graph api using javascript sdk. I'm fetching page feed with their likes count and user and same for comment. but after some time I'm getting wrong user_id for all the page post like and comments.
when I'm trying to get this using facebook graph explorer it is giving me right result.
I've used app_access_token and user-access-token..
what is wrong with facebook graph api.
You are probably talking about "App Scoped IDs": https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids
Apps donĀ“t return real User IDs anymore, only IDs bound to one specific App. The Graph API Explorer should return the exact same ID for a User, as long as you select the same App before making an API call.

Categories

Resources