Article Image
read

Here are some links and tips to hack Facebook, Twitter and Instagram API restrictions. Because, well, when you want to launch very small projects, you want things to go fast.

Paying attention to prototyping instead of marketing your idea first (Facebook needs way too much informations before letting you accessing to simple datas).

Retrieving Facebook user datas: profile pic without Access Token

https://graph.facebook.com/[ID_FACEBOOK]/picture?type=[square/small/normal/large]&width=[WIDTH]&height=[HEIGHT]

You'll have to change the Facebook ID, the type of pic you want to retrieve and then the size needed.

Need to try with your ID? Find it here: Graph Explorer.

Retrieving Twitter user datas: profile pic without Access Token

https://twitter.com/[SCREEN_NAME]/profile_image?size=[normal/mini/bigger/original]

You'll have to change the Twitter screenname (username) and the size needed. Magic.

Retrieving Instagram user datas without Access Token

https://www.instagram.com/[USERNAME]/?__a=1

I'm not kidding, this is working and this is crazy. I know.

Retrieving Instagram user pictures without Access Token

https://www.instagram.com/[USERNAME]/media

This is insane. A f°ck°°° JSON with everything we need. Yes. BUT: you'll have to create a proxy to deal with crossdomain restriction.

Here's an example using Node.JS, using NPM 'request' module (the URL is sent using GET method: http://localhost:3000/url-proxy?url=[URL]):

var request = require('request');
app.get('/url-proxy', function (req, res, next) {
  request.get(req.query.url).pipe(res);
});

Enjoy :)

Blog Logo

Florent Bertiaux

I'm a blogger


Published

Image

I learned something new

A blog from @kxrz - Dev tips and tricks

Back to Overview