简体   繁体   English

react-native:如何从公共Facebook页面获取帖子?

[英]react-native : How to fetch posts from a public facebook page?

This is more a general question than a problem. 这更是一个普遍的问题,而不是问题。

I'm developing a react native application, and i need to integrate a page that shows facebook posts. 我正在开发一个React本机应用程序,并且我需要集成一个显示Facebook帖子的页面。

However, i can't see how to fetch posts from the page, please note that it's a public page. 但是,我看不到如何从页面中获取帖子,请注意,这是一个公共页面。

How could i fetch posts from a facebook public page using react native? 我如何使用react native从Facebook公共页面获取帖子?

Before stepping into ReactNative, you should first plan how to fetch data from facebook. 在进入ReactNative之前,您应该首先计划如何从Facebook获取数据。

Facebook offers the Graph API, which suits your needs. Facebook提供了适合您需求的Graph API。

https://developers.facebook.com/docs/graph-api/ https://developers.facebook.com/docs/graph-api/

Here is the docs specifically for Facebook pages. 这是专门针对Facebook页面的文档。

https://developers.facebook.com/docs/pages/ https://developers.facebook.com/docs/pages/

The response from the API is usually in JSON format, then you can use the fetch API of javascript in ReactNative. API的响应通常为JSON格式,那么您可以在ReactNative中使用javascript的访存API。

I strongly suggest doing the API calls on your server tho. 我强烈建议您在服务器上进行API调用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM