Recently, in the study the Facebook API, try to find a feed/data, but I feed data no contents, run the following program, there will be the Additional Information: Can not perform runtime binding on a null reference ":

  dynamic feeds = await fbClient.GetTaskAsync(strID + "?fields=feed");
  foreach (var data in feeds.feed.data)
  {
     ...
  }

Later changed to:

  dynamic feeds = await fbClient.GetTaskAsync(strID + "/feed");
  if (feeds != null)
  {
    foreach (var data in feeds.data)
    {
       ...
    }
  }

The problem is solved.

創作者介紹
創作者 Conan 0101 的部落格 的頭像
Conan

Conan 0101 的部落格

Conan 發表在 痞客邦 留言(0) 人氣( 12 )