On my Website in PHP, Check if user liked my Facebook page -


if visitor website logged facebook, want check if have 'liked' facebook page. if not want ask them 'like' (e.g. via overlay popup). don't want prompt request users have 'liked' page.

of course point check 'in background' without asking users extended permissions, if wanted user use app.

i have found several references on how accomplish via facebook's php sdk, seems referring older version of sdk, , no longer work.

i total n00b when comes stuff. i've been able manage setup sdk environment:

require_once 'src/facebook/autoload.php'; //create facebook service $fb = new facebook\facebook ([     'app_id' => '-----------------',     'app_secret' => '--------------------',     'default_graph_version' => 'v2.4'     ]); 

what method/methods can use new sdk above check this? in old methods found check done via $fb->api("/me/likes/page_id");, , page's id referenced, said no longer works.

is there equivalent method can used new sdk? , if so, provide me exact code it?

or looking no longer supported facebook?

extreme , gratitude can put me on right path!


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -