{"id":13220,"date":"2014-04-28T17:02:17","date_gmt":"2014-04-28T11:32:17","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=13220"},"modified":"2014-04-28T20:40:24","modified_gmt":"2014-04-28T15:10:24","slug":"facebook-oauth-for-fetching-page-token","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/","title":{"rendered":"Facebook Oauth for fetching page token"},"content":{"rendered":"<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/OAuth\">OAuth<\/a> is a secure mechanism to access facebook.<\/p>\n<p>To access facebook in your grails application you need to create a facebook app, go to <a href=\"https:\/\/developers.facebook.com\/\">https:\/\/developers.facebook.com<\/a>, click on Apps dropdown, further click on &#8216;Create a new App&#8217;.<\/p>\n<p>Ensure that you register the URL of you application with the Facebook app you have setup.<\/p>\n<p>Save your apiKey and secretKey provided by Facebook.<\/p>\n<p>We are going to use <a href=\"https:\/\/github.com\/fernandezpablo85\/scribe-java\/\">Scribe<\/a> java library for Oauth authentication.<\/p>\n<p>Add this to your BuildConfig.groovy for integrating Scribe.<\/p>\n<p>[java]<\/p>\n<p>compile &#8216;org.scribe:scribe:1.3.5&#8217;<\/p>\n<p>[\/java]<\/p>\n<p>Create a controller, lets call it Demo Controller and define some variables in it.<\/p>\n<p>[java]<\/p>\n<p>class DemoController {<br \/>\n     String apiKey = \u201cxxxxxxxxxxxxxxx\u201d<br \/>\n     String secretKey = &quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;<br \/>\n     String baseUrl = &quot;https:\/\/graph.facebook.com\/&quot;;<br \/>\n     String callbackUrl = \u201c\/demo\/action2\u201d \/\/ link to the callback url of your application<br \/>\n     String fbUserToken \/\/ we will get value for this later<br \/>\n     String pageToken \/\/ we will get value for this later<br \/>\n}<\/p>\n<p>[\/java]<\/p>\n<p>Now create an action using which we will initiate the Oauth flow<\/p>\n<p>[java]<\/p>\n<p>def index() {<br \/>\n     OAuthService service = new ServiceBuilder()<br \/>\n             .provider(FacebookApi.class)<br \/>\n             .apiKey(apiKey)<br \/>\n             .apiSecret(secretKey)<br \/>\n             .scope(&quot;manage_pages,read_insights&quot;)<br \/>\n             .callback(grailsApplication.config.grails.serverURL + callbackUrl)<br \/>\n             .build();<br \/>\n     String authUrl = service.getAuthorizationUrl(null);<br \/>\n     redirect(url: authUrl.toURL())<br \/>\n}<br \/>\n[\/java]<\/p>\n<p>This action will initiate a call to Facebook Oauth and user will be redirected to a facebook login page. Upon successful authentication, the user will be redirected to the callback url of your application as specified by you. (\/demo\/action2 in this case).<\/p>\n<p>Here you will receieve authorization code in params. Which you can use to generate a short term token.<\/p>\n<p>[java]<br \/>\ndef action2() {<br \/>\n     OAuthService service = new ServiceBuilder()<br \/>\n                       .provider(FacebookApi.class)<br \/>\n                       .apiKey(apiKey<br \/>\n                       .apiSecret(secretKey)<br \/>\n                       .scope(&quot;manage_pages,read_insights&quot;)<br \/>\n                       .callback(grailsApplication.config.grails.serverURL + callbackUrl)<br \/>\n                       .build();<br \/>\n     Verifier v = new Verifier(params.code);<br \/>\n     Token accessToken = service.getAccessToken(null, v); \/\/ returns short term token for FB User<br \/>\n     fbUserToken = getLongTermUserToken(accessToken.token) \/\/ returns long term token for FB User which is valid for 2 months.<br \/>\n     pageToken = getPageToken(longTermToken) \/\/ returns the long term token for the facebook page which has no expiry.<br \/>\n}<br \/>\n[\/java]<\/p>\n<p>Now we have a access token, using which we can make calls to facebook on behalf of user, however, this is only a short term token valid for period of about 10 mins. We can get a long term token using :<\/p>\n<p>[java]<\/p>\n<p>fbUserToken = getLongTermUserToken(accessToken.token)  \/\/ returns long term token for FB User which is valid for 2 months.<\/p>\n<p>String getLongTermUserToken(String accessToken) {<br \/>\n     String url = baseUrl + &quot;oauth\/access_token?grant_type=fb_exchange_token&amp;client_id=${apiKey}&amp;client_secret=${apiSecret}&amp;fb_exchange_token=${accessToken}&quot;<br \/>\n     URL longTermUrl=new URL(url)<br \/>\n     String response = longTermUrl.text<br \/>\n     String longTermToken = extractLongTermToken(response)<br \/>\n     if (!longTermToken) {<br \/>\n          throw new Exception(&quot;Some good exception while fetching Long term Token&quot;)<br \/>\n     }<br \/>\n     return longTermToken<br \/>\n}<\/p>\n<p>String extractLongTermToken(String response) {<br \/>\n      List list = response.tokenize(&quot;&amp;&quot;)<br \/>\n      String result = &quot;&quot;<br \/>\n      list.each { String s -&gt;<br \/>\n           if (s.startsWith(&quot;access_token&quot;)) {<br \/>\n           result = s.tokenize(&quot;=&quot;).last()<br \/>\n        }<br \/>\n     }<br \/>\n     return result<br \/>\n}<br \/>\n[\/java]<\/p>\n<p>Now we have a long term token, which is valid for about 2 months. However to retrieve page information of a page managed by user, we need another token known as page token. To get page token :<\/p>\n<p>[java]<\/p>\n<p>String getPageToken(String longTermToken) {<br \/>\n     String url = baseUrl + &quot;me\/accounts?access_token=${longTermToken}&quot;<br \/>\n     URL pageTokenUrl=new URL(url)<br \/>\n     String dataString = pageTokenUrl.text<br \/>\n     JSONObject data = JSON.parse(dataString)<br \/>\n     Map response = data as Map<br \/>\n     String pageToken = extractPageToken(response)<br \/>\n     if (!pageToken) {<br \/>\n          throw new Exception(&quot;Some good exception while fetching Page Token&quot;)<br \/>\n     }<br \/>\n     return pageToken<br \/>\n}<\/p>\n<p>String extractPageToken(Map response) {<br \/>\n     String pageToken = &#8221;<br \/>\n     response.data.each {<br \/>\n         if (it.id == pageId) {<br \/>\n              pageToken = it.access_token<br \/>\n         }<br \/>\n     }<br \/>\n     return pageToken<br \/>\n}<\/p>\n<p>[\/java]<\/p>\n<p>Notice that we are using long term access token to get the page token. A page token fetched using long term access token has no expiry date. Now we can use this page token to fetch information for the page like page insights etc.<\/p>\n<p>Hope it helps.<\/p>\n<p>Mansi Arora<\/p>\n<p>mansi[at]ntelligrape[dot]com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OAuth is a secure mechanism to access facebook. To access facebook in your grails application you need to create a facebook app, go to https:\/\/developers.facebook.com, click on Apps dropdown, further click on &#8216;Create a new App&#8217;. Ensure that you register the URL of you application with the Facebook app you have setup. Save your apiKey [&hellip;]<\/p>\n","protected":false},"author":79,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":24,"footnotes":""},"categories":[7],"tags":[703,4840,770,1413,1414],"class_list":["post-13220","post","type-post","status-publish","format-standard","hentry","category-grails","tag-facebook","tag-grails","tag-oauth","tag-page-token","tag-scribe"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"OAuth is a secure mechanism to access facebook. To access facebook in your grails application you need to create a facebook app, go to https:\/\/developers.facebook.com, click on Apps dropdown, further click on &#039;Create a new App&#039;. Ensure that you register the URL of you application with the Facebook app you have setup. Save your apiKey\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Mansi Arora\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Facebook Oauth for fetching page token | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"OAuth is a secure mechanism to access facebook. To access facebook in your grails application you need to create a facebook app, go to https:\/\/developers.facebook.com, click on Apps dropdown, further click on &#039;Create a new App&#039;. Ensure that you register the URL of you application with the Facebook app you have setup. Save your apiKey\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Facebook Oauth for fetching page token | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"OAuth is a secure mechanism to access facebook. To access facebook in your grails application you need to create a facebook app, go to https:\/\/developers.facebook.com, click on Apps dropdown, further click on &#039;Create a new App&#039;. Ensure that you register the URL of you application with the Facebook app you have setup. Save your apiKey\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/facebook-oauth-for-fetching-page-token\\\/#article\",\"name\":\"Facebook Oauth for fetching page token | TO THE NEW Blog\",\"headline\":\"Facebook Oauth for fetching page token\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/mansi\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2014-04-28T17:02:17+05:30\",\"dateModified\":\"2014-04-28T20:40:24+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":6,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/facebook-oauth-for-fetching-page-token\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/facebook-oauth-for-fetching-page-token\\\/#webpage\"},\"articleSection\":\"Grails, Facebook, Grails, oauth, page token, scribe\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/facebook-oauth-for-fetching-page-token\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"position\":2,\"name\":\"Grails\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/facebook-oauth-for-fetching-page-token\\\/#listItem\",\"name\":\"Facebook Oauth for fetching page token\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/facebook-oauth-for-fetching-page-token\\\/#listItem\",\"position\":3,\"name\":\"Facebook Oauth for fetching page token\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/mansi\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/mansi\\\/\",\"name\":\"Mansi Arora\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/facebook-oauth-for-fetching-page-token\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a58f57a35d110e644b024b38bf813f047dd8d76cc2354cdd1ac1ccfe5a2a508d?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Mansi Arora\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/facebook-oauth-for-fetching-page-token\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/facebook-oauth-for-fetching-page-token\\\/\",\"name\":\"Facebook Oauth for fetching page token | TO THE NEW Blog\",\"description\":\"OAuth is a secure mechanism to access facebook. To access facebook in your grails application you need to create a facebook app, go to https:\\\/\\\/developers.facebook.com, click on Apps dropdown, further click on 'Create a new App'. Ensure that you register the URL of you application with the Facebook app you have setup. Save your apiKey\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/facebook-oauth-for-fetching-page-token\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/mansi\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/mansi\\\/#author\"},\"datePublished\":\"2014-04-28T17:02:17+05:30\",\"dateModified\":\"2014-04-28T20:40:24+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Facebook Oauth for fetching page token | TO THE NEW Blog","description":"OAuth is a secure mechanism to access facebook. To access facebook in your grails application you need to create a facebook app, go to https:\/\/developers.facebook.com, click on Apps dropdown, further click on 'Create a new App'. Ensure that you register the URL of you application with the Facebook app you have setup. Save your apiKey","canonical_url":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/#article","name":"Facebook Oauth for fetching page token | TO THE NEW Blog","headline":"Facebook Oauth for fetching page token","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/mansi\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2014-04-28T17:02:17+05:30","dateModified":"2014-04-28T20:40:24+05:30","inLanguage":"en-US","commentCount":6,"mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/#webpage"},"articleSection":"Grails, Facebook, Grails, oauth, page token, scribe"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/www.tothenew.com\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/#listItem","name":"Facebook Oauth for fetching page token"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/#listItem","position":3,"name":"Facebook Oauth for fetching page token","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/mansi\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/mansi\/","name":"Mansi Arora","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a58f57a35d110e644b024b38bf813f047dd8d76cc2354cdd1ac1ccfe5a2a508d?s=96&d=mm&r=g","width":96,"height":96,"caption":"Mansi Arora"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/","name":"Facebook Oauth for fetching page token | TO THE NEW Blog","description":"OAuth is a secure mechanism to access facebook. To access facebook in your grails application you need to create a facebook app, go to https:\/\/developers.facebook.com, click on Apps dropdown, further click on 'Create a new App'. Ensure that you register the URL of you application with the Facebook app you have setup. Save your apiKey","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/mansi\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/mansi\/#author"},"datePublished":"2014-04-28T17:02:17+05:30","dateModified":"2014-04-28T20:40:24+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Facebook Oauth for fetching page token | TO THE NEW Blog","og:description":"OAuth is a secure mechanism to access facebook. To access facebook in your grails application you need to create a facebook app, go to https:\/\/developers.facebook.com, click on Apps dropdown, further click on 'Create a new App'. Ensure that you register the URL of you application with the Facebook app you have setup. Save your apiKey","og:url":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Facebook Oauth for fetching page token | TO THE NEW Blog","twitter:description":"OAuth is a secure mechanism to access facebook. To access facebook in your grails application you need to create a facebook app, go to https:\/\/developers.facebook.com, click on Apps dropdown, further click on 'Create a new App'. Ensure that you register the URL of you application with the Facebook app you have setup. Save your apiKey","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"13220","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 23:48:29","updated":"2024-02-29 09:33:28","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/grails\/\" title=\"Grails\">Grails<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tFacebook Oauth for fetching page token\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Grails","link":"https:\/\/www.tothenew.com\/blog\/category\/grails\/"},{"label":"Facebook Oauth for fetching page token","link":"https:\/\/www.tothenew.com\/blog\/facebook-oauth-for-fetching-page-token\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/13220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/79"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=13220"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/13220\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=13220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=13220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=13220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}