在网站上创建自定义Facebook Feed

时间:2016-05-25 13:59:56

标签: php facebook

我试图找到有关为任何网站创建自定义Facebook Feed的一些信息/文档。 (自定义css等),但几乎没有找到。我想阅读公共Facebook页面上的帖子,并在猫头鹰轮播中将它们显示在我的网站上。

我发现的唯一指南已经过时,因为facebook开发者页面完全改变了,其他指南都是针对Wordpress的。

有没有人知道任何好的指南,或者任何人都可以帮助我朝着好的方向前进?

由于

1 个答案:

答案 0 :(得分:1)

示例代码和信息可以在API参考中找到:

https://developers.facebook.com/docs/graph-api/reference/page/feed#read

我建议在服务器上使用App Token,它永远有效。如果你不知道不同的令牌,这里有一些链接:

旁注:要获取图片,您可以使用/page-id/feed?fields=full_picture字段:Private Sub Main() Dim shortName as String = GetShortEXEName(GetForegroundWindow() ) End Sub ' Define other methods and classes here <DllImport("user32.dll", SetLastError := True)> _ Public Shared Function GetForegroundWindow() As IntPtr End Function Public Shared Function GetProcess(hwnd As IntPtr) As Process Dim intID As Integer = 0 GetWindowThreadProcessId(hwnd, intID) Return Process.GetProcessById(intID) End Function <DllImport("user32.dll", SetLastError := True)> _ Public Shared Function GetWindowThreadProcessId(hwnd As IntPtr, ByRef lpdwProcessId As Integer) As Integer End Function Public Shared Function GetShortEXEName(hwnd As IntPtr) As String ' this seems to be better to use than calling GetProcessEXEName and then using substring functions to get the short executable name ' because that function seems to crash when dealing with Windows Explorer windows Try Return GetProcess(hwnd).ProcessName Catch Return "" End Try End Function