Get Instagram Access Token for PHP

In this Article I will explain how I successfully migrated a forum from PHPbb to BBpress in 5 minutes. It was easiest than I ever thought. After migrating to BBpress I just add few lines of code in a template file of phpBB to make a clean SEO redirect to the new forum. All worked like charm.

Be careful: Why to move from phpBB to BBpress?

I supose you already spend some time taking this decision, but remember this quick comparison phpBB Vs BBpress:

«bbpress is SIMPLICITY», «PHPbb is POWERFUL».

if you want to migrate a small starting community from phpBB to BBpress, it’s OK, if you want to migrate a large big community, maybe users will not understand the lack of functionality they are used to have in your phpBB forum.

In my case, I did a migration of a phpBB forum to wordpress BBpress because it was a in the early days of the creation of a community, the simplicity benefit of bbpress, worpress blogging integration, and the flexibility to add and mould the website towards the needs of the future community.

The migration from phpBB to BBpress:

STEP 1.- Installation of bbpress (Skip if you already installed it):

  • Install wordpress,
  • settings–> permalinks –>select post name
Captura de pantalla 2016-02-27 17.45.30

settings to migrate phpbb to bbpress

 

  • install bbpress
  • settings–> forums –>configure as I show in the screenshot
bbpress configuration

migrate phpbb to bbpress: configure bbpress like this

STEP 2.- And the only one step to migrate from phpbb to bbpress is:

TIPS:
1.- choose a different URL for the new forum. for example, if you used /forum/ in phpBB, use /forums/ in bbpress
2.- don’t delete your phpBB forum.
3.- as an extra, in phpbb you could disable registration of new users, and add a message in the /styles/prosilver/template/overall_header.html   file.

Preserving the SEO after moving from PHPbb to BBpress

It’s very easy!!!

and this is very important, not only to avoid penalizations, but to correctly direct potential users that come from SERP results in google to the new forum and don’t loose or frustrate visitors after the phpBB to BBpress migration.

STEP 3.- SEO 301 redirect

Open/edit:
/styles/prosilver/template/overall_header.html

search for:

// Send vars to template
$template->assign_vars(array(
‘FORUM_ID’ => $forum_id,

and just above this lines add this piece of code:

##################################
$titleac = trim($topic_data[‘topic_title’]);
$relativeurl = str_replace(‘ ‘,’-‘,$titleac);
$relativeurl = strtolower($relativeurl);
header(«HTTP/1.1 301 Moved Permanently»);
header(«Location: http://www.YOURDOMAIN.com/forums/topic/».$relativeurl.»/»);
#####################################

Links:
Comparison from the bbpress comunity point of view: https://bbpress.org/forums/topic/bbpress-vs-phpbb/
If this tutorial mof moving phpBB to BBpress was useful for you, please just let me know with a comment
Very very easy proven method.
I struggle a bit at the beginning,
search on Google and find the solution.

Sign up in Instagram api web

manage clients

captura-de-pantalla-2016-11-22-00-39-52

enable implicit OAuth
if you dont enable this you will get the error: «implicit authentication is disabled»

captura-de-pantalla-2016-11-22-00-36-05

 

open the URL :

https://api.instagram.com/oauth/authorize/?client_id=xxxxxxx5734135866xxxxxxxx&redirect_uri=http://abiliocaetano.com/instagram-redirect/&response_type=token

replace client_id with the client id you can find in «manage clients»

replace redirect_uri with the redirect_uri you can find in «manage clients»

 

captura-de-pantalla-2016-11-22-00-38-17

this web page will open

captura-de-pantalla-2016-11-22-00-37-52

Authorize

and it redirect to your web site with the token in the URL as a GET parameter.

http://abiliocaetano.com/instagram-redirect/#access_token=xxxxxxxx69a82fda4e2xxxxxxxx

copy the parameter value and you will have the Access Token.

 

Now you can use the Access Token inside your PHP script, or wherever you want to do your first tests.