C# equivalent of file_get_contents (PHP)

两盒软妹~` 提交于 2019-12-02 00:16:34

To use oauth/access_token or any methods related to oauth stuffs use FacebookOAuthClient not FacebookClient or FacebookClient.

FacebookOAuthClient.GetApplicationAccessToken(..)
FacebookOAuthClient.ExchangeCodeForAccessToken(..)
Bas

You can use WebClient.DownloadString to download text from a URL. The WebClient also supports authentication.

Also, to split your string into lines you can use:

string test;
string[] lines = test.Split('\n');
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!