且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从网址获取Facebook页面用户名或Facebook页面ID

更新时间:2023-11-27 20:03:52

如下:

$url='http://www.facebook.com/pages/myfacebookpage/54878424154545487'; // the input
$pieces = explode('/', $url); // divides the string in pieces where '/' is found
$key=end($pieces); //takes the last piece