My question is: how to get facebook page_id starting with a simple fb url. For instance:
Actually, if the url matches the string "facebook.com/pages/", I call:
else I call:
This approach seems to work well, but it is really empirical and looks at the documentation. I do not see any offers.What do you think about?
I'm not quite sure what you are asking for, but I think you are saying that you are trying to get the page id, which you only know by its “vanity url” or “nickname”.
Basically, you can execute the api facebook graph api request on the “vanity url” and then grab the id from the provided request.
For example ... if you open the Facebook charting API the https://developers.facebook.com/tools/explorer?method=GET&path=coca.cola API.
or request http://graph.facebook.com/coca.cola
you can see in the answer that you get "id": "40796308305" which is the identifier of the page you are talking about.
Going to http://www.facebook.com/40796308305 should confirm this.
Hope this helps.
For my OG meta <meta property="fb:app_id" content="010101010101010" />
<meta property="fb:app_id" content="010101010101010" />
I got the page id of the page by going here:
https://developers.facebook.com/docs/plugins/page-plugin
get code> appId
Line 6: js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.9&appId= 010101010101010";
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.9&appId= 010101010101010";
The shared debugger now stops complaining https://developers.facebook.com/tools/debug/
Source: https://habr.com/ru/post/898535/More articles:Check if user is allowed (HTTP Basic Authentication, Rails 3.0.9) - ruby-on-rails-3id / counter generation for foreach in lead latin - apache-pigWhy does Rails preload all its dependencies (gems) at boot time? - performanceSource code is different from source - debuggingNumber of individual records - SQL - sqlCross-domain queries using jQuery - jqueryRuby Regex, only one capture (very simple!) - ruby | fooobar.comAJAX / jQuery / Javascript - access to a page in an external domain - jqueryUnderstanding jQuery jqXHR - javascriptlinq to entity framework: use dictionary in query - linqAll Articles