{"id":4802,"date":"2011-12-22T20:51:34","date_gmt":"2011-12-22T15:21:34","guid":{"rendered":"https:\/\/2thenew.xyz\/blog\/?p=4802"},"modified":"2015-05-19T17:45:37","modified_gmt":"2015-05-19T12:15:37","slug":"way-to-check-if-user-has-liked-the-facebook-fan-page-or-not","status":"publish","type":"post","link":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/","title":{"rendered":"Way to check if user has &#8220;Liked&#8221; the Facebook Fan Page or Not"},"content":{"rendered":"<p>Hi,<br \/>\nIn my recent grails project, i was working on creating Apps for Facebook Fan Page and needed to show data to the user in such a way so that if he\/she has &#8220;Liked&#8221; the page, then the content would be different from the case when the user has not liked it.<\/p>\n<pre><\/pre>\n<p>In simple words, if user is Fan of any Facebook Page, then the content of App Tab would be different from the user who is not Fan of that Page.<\/p>\n<pre><\/pre>\n<p>I searched a lot about it, and came across various solutions suggesting using <a href=\"http:\/\/developers.facebook.com\/docs\/reference\/javascript\/FB.getLoginStatus\/\">JavaScript<\/a> way to handle it but they didn&#8217;t worked for me, because although the User is logged in the facebook, but has not authorized the App and hence, we cannot fetch <strong>user_id<\/strong> of that user from facebook session.<\/p>\n<pre><\/pre>\n<p>The only way i left with is to fetch the User status from the <a href=\"http:\/\/developers.facebook.com\/docs\/authentication\/signed_request\/\">signed_request<\/a> served in the params. This is the easiest way i got, to check whether User has &#8216;Liked&#8217; the page or not, on server side.<\/p>\n<pre><\/pre>\n<p>A signed_request is passed in params to the application URL registered in App on Facebook when they are loaded into the Facebook environment. It is of the form of long sequence of string concatenation of a <a href=\"http:\/\/en.wikipedia.org\/wiki\/HMAC\">HMAC<\/a> <a href=\"http:\/\/en.wikipedia.org\/wiki\/SHA-2\">SHA-256<\/a> signature string, a period (.), and a base64url encoded JSON object.<\/p>\n<pre><\/pre>\n<p>Code to decode signed_request<\/p>\n<p>[java]<\/p>\n<p>        String signedRequest= SIGNED_REQUEST_OBTAINED_IN_PARAMS<br \/>\n        boolean hasLikedPage = false<br \/>\n        String payload = signedRequest.split(&quot;[.]&quot;, 2)[1]<br \/>\n        payload = payload.replace(&quot;-&quot;, &quot;+&quot;).replace(&quot;_&quot;, &quot;\/&quot;).trim()<br \/>\n        String jsonString = new String(Base64.decodeBase64(payload.getBytes()))<\/p>\n<p>[\/java]<\/p>\n<p>The above code will gives a string containing all the data in the signed_request(as in below example).<br \/>\nExample:<\/p>\n<p>[java]<br \/>\n{<br \/>\n   &quot;algorithm&quot;:&quot;HMAC- SHA256&quot;,<br \/>\n    &quot;expires&quot;:1324555200,<br \/>\n    &quot;issued_at&quot;:1324551348,<br \/>\n    &quot;oauth_token&quot;:&quot;some-random-string-of-oauth-token&quot;,<br \/>\n    &quot;page&quot;: {<br \/>\n            &quot;id&quot;:&quot;XXXXXXXXXXX594&quot;,<br \/>\n             &quot;liked&quot;:true, \/\/ field to decide if user has &quot;Liked&quot; the fan page or not<br \/>\n             &quot;admin&quot;:false<br \/>\n          },<br \/>\n    &quot;user&quot;:{<br \/>\n            &quot;country&quot;:&quot;in&quot;,<br \/>\n            &quot;locale&quot;:&quot;en_US&quot;,<br \/>\n            &quot;age&quot;:{<br \/>\n                     &quot;min&quot;:21<br \/>\n                    }<br \/>\n              },<br \/>\n    &quot;user_id&quot;:&quot;XXXXXXX3285&quot;<br \/>\n}<\/p>\n<p>[\/java]<\/p>\n<p>With the above JSON, we can see if the user has &#8220;Liked&#8221; the Fan Page or Not.<\/p>\n<pre><\/pre>\n<p>This worked for me.<br \/>\nHope it helps<\/p>\n<pre><\/pre>\n<p>Cheers!!<br \/>\nVishal Sahu<br \/>\nvishal@intelligrape.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, In my recent grails project, i was working on creating Apps for Facebook Fan Page and needed to show data to the user in such a way so that if he\/she has &#8220;Liked&#8221; the page, then the content would be different from the case when the user has not liked it. In simple words, [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1,"footnotes":""},"categories":[7],"tags":[703,728,705,727,700],"class_list":["post-4802","post","type-post","status-publish","format-standard","hentry","category-grails","tag-facebook","tag-facebook-app","tag-facebook-fan-page","tag-fan-page","tag-social-media"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Hi, In my recent grails project, i was working on creating Apps for Facebook Fan Page and needed to show data to the user in such a way so that if he\/she has &quot;Liked&quot; the page, then the content would be different from the case when the user has not liked it. In simple words,\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Vishal Sahu\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/\" \/>\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=\"Way to check if user has \u201cLiked\u201d the Facebook Fan Page or Not | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Hi, In my recent grails project, i was working on creating Apps for Facebook Fan Page and needed to show data to the user in such a way so that if he\/she has &quot;Liked&quot; the page, then the content would be different from the case when the user has not liked it. In simple words,\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.xyz\/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=\"Way to check if user has \u201cLiked\u201d the Facebook Fan Page or Not | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Hi, In my recent grails project, i was working on creating Apps for Facebook Fan Page and needed to show data to the user in such a way so that if he\/she has &quot;Liked&quot; the page, then the content would be different from the case when the user has not liked it. In simple words,\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.xyz\/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\\\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\\\/#article\",\"name\":\"Way to check if user has \\u201cLiked\\u201d the Facebook Fan Page or Not | TO THE NEW Blog\",\"headline\":\"Way to check if user has &#8220;Liked&#8221; the Facebook Fan Page or Not\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vishal\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2011-12-22T20:51:34+05:30\",\"dateModified\":\"2015-05-19T17:45:37+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":2,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\\\/#webpage\"},\"articleSection\":\"Grails, Facebook, Facebook App, Facebook Fan Page, Fan Page, Social Media\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\\\/#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\\\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\\\/#listItem\",\"name\":\"Way to check if user has &#8220;Liked&#8221; the Facebook Fan Page or Not\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\\\/#listItem\",\"position\":3,\"name\":\"Way to check if user has &#8220;Liked&#8221; the Facebook Fan Page or Not\",\"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\\\/vishal\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vishal\\\/\",\"name\":\"Vishal Sahu\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/04ab2997182dff5e957d14b30bdc77fc09933e3d6e7f97b00f8ee27b193602a2?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Vishal Sahu\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\\\/\",\"name\":\"Way to check if user has \\u201cLiked\\u201d the Facebook Fan Page or Not | TO THE NEW Blog\",\"description\":\"Hi, In my recent grails project, i was working on creating Apps for Facebook Fan Page and needed to show data to the user in such a way so that if he\\\/she has \\\"Liked\\\" the page, then the content would be different from the case when the user has not liked it. In simple words,\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vishal\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vishal\\\/#author\"},\"datePublished\":\"2011-12-22T20:51:34+05:30\",\"dateModified\":\"2015-05-19T17:45:37+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":"Way to check if user has \u201cLiked\u201d the Facebook Fan Page or Not | TO THE NEW Blog","description":"Hi, In my recent grails project, i was working on creating Apps for Facebook Fan Page and needed to show data to the user in such a way so that if he\/she has \"Liked\" the page, then the content would be different from the case when the user has not liked it. In simple words,","canonical_url":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/#article","name":"Way to check if user has \u201cLiked\u201d the Facebook Fan Page or Not | TO THE NEW Blog","headline":"Way to check if user has &#8220;Liked&#8221; the Facebook Fan Page or Not","author":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/vishal\/#author"},"publisher":{"@id":"https:\/\/2thenew.xyz\/blog\/#organization"},"datePublished":"2011-12-22T20:51:34+05:30","dateModified":"2015-05-19T17:45:37+05:30","inLanguage":"en-US","commentCount":2,"mainEntityOfPage":{"@id":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/#webpage"},"articleSection":"Grails, Facebook, Facebook App, Facebook Fan Page, Fan Page, Social Media"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.xyz\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/2thenew.xyz\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/#listItem","name":"Way to check if user has &#8220;Liked&#8221; the Facebook Fan Page or Not"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/#listItem","position":3,"name":"Way to check if user has &#8220;Liked&#8221; the Facebook Fan Page or Not","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.xyz\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.xyz\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.xyz\/blog\/author\/vishal\/#author","url":"https:\/\/2thenew.xyz\/blog\/author\/vishal\/","name":"Vishal Sahu","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/04ab2997182dff5e957d14b30bdc77fc09933e3d6e7f97b00f8ee27b193602a2?s=96&d=mm&r=g","width":96,"height":96,"caption":"Vishal Sahu"}},{"@type":"WebPage","@id":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/#webpage","url":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/","name":"Way to check if user has \u201cLiked\u201d the Facebook Fan Page or Not | TO THE NEW Blog","description":"Hi, In my recent grails project, i was working on creating Apps for Facebook Fan Page and needed to show data to the user in such a way so that if he\/she has \"Liked\" the page, then the content would be different from the case when the user has not liked it. In simple words,","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.xyz\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/vishal\/#author"},"creator":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/vishal\/#author"},"datePublished":"2011-12-22T20:51:34+05:30","dateModified":"2015-05-19T17:45:37+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.xyz\/blog\/#website","url":"https:\/\/2thenew.xyz\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.xyz\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Way to check if user has \u201cLiked\u201d the Facebook Fan Page or Not | TO THE NEW Blog","og:description":"Hi, In my recent grails project, i was working on creating Apps for Facebook Fan Page and needed to show data to the user in such a way so that if he\/she has &quot;Liked&quot; the page, then the content would be different from the case when the user has not liked it. In simple words,","og:url":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/","og:image":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Way to check if user has \u201cLiked\u201d the Facebook Fan Page or Not | TO THE NEW Blog","twitter:description":"Hi, In my recent grails project, i was working on creating Apps for Facebook Fan Page and needed to show data to the user in such a way so that if he\/she has &quot;Liked&quot; the page, then the content would be different from the case when the user has not liked it. In simple words,","twitter:image":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"4802","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 17:34:01","updated":"2024-02-29 08:50:44","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:\/\/2thenew.xyz\/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:\/\/2thenew.xyz\/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\tWay to check if user has \u201cLiked\u201d the Facebook Fan Page or Not\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.xyz\/blog"},{"label":"Grails","link":"https:\/\/2thenew.xyz\/blog\/category\/grails\/"},{"label":"Way to check if user has &#8220;Liked&#8221; the Facebook Fan Page or Not","link":"https:\/\/2thenew.xyz\/blog\/way-to-check-if-user-has-liked-the-facebook-fan-page-or-not\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts\/4802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/comments?post=4802"}],"version-history":[{"count":0,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts\/4802\/revisions"}],"wp:attachment":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/media?parent=4802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/categories?post=4802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/tags?post=4802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}