2012-05-11 7 views
0

Facebookのドキュメント(here)を読んで、オブジェクトの再スクリープを強制して、ユーザーのタイムライン上でオブジェクトを更新できるようにすることができます。C#SDK v6 - 強制的にオブジェクトの再スクレイプを実行するには?

Updating Objects

When modifying Open Graph objects, you will need to tell Facebook’s scraper to rescrape your page to pull in the updated information. There are a couple different ways to have your object re-scraped.

More automated by using the "scrape=true" POST parameter. Make a POST call to https://graph.facebook.com/?id= {id}&scrape=true where {id} is the object id or the url of the object. The response is a JSON object with the data scraped for the url.

C#SDKを使用してこのことについてどうやって調べてみましょうか?事前に

おかげで、 チャド

EDIT:

 Dim fbData As FacebookSDKInterface = New FacebookSDKInterface() 
     Dim fb As Facebook.FacebookClient = New Facebook.FacebookClient(fbData.FacebookAccessToken) 

     Dim fbURL As String = NavigateURL() & "?ID=" & GetPathFromDyno(e.Keys(0)) 

     Dim dicFBPostParams As New Dictionary(Of String, String) 
     dicFBPostParams.Add("id", fbURL) 
     dicFBPostParams.Add("scrape", "true") 


     fb.Post(dicFBPostParams) 

しかし、私はこのエラーを得た:私は、拙速なテストとして、以下を試してみました

System.Reflection.TargetParameterCountException: Parameter count mismatch. at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) at Facebook.FacebookClient.ToDictionary(Object parameters, IDictionary`2& mediaObjects, IDictionary`2& mediaStreams) at Facebook.FacebookClient.PrepareRequest(HttpMethod httpMethod, String path, Object parameters, Type resultType, Stream& input, Boolean& containsEtag, IList`1& batchEtags) at Facebook.FacebookClient.Api(HttpMethod httpMethod, String path, Object parameters, Type resultType) at Facebook.FacebookClient.Post(String path, Object parameters) at Facebook.FacebookClient.Post(Object parameters) at Incite.Modules.TheDynoRoom.MyGarage.dtlDyno_ItemUpdated(Object sender, DetailsViewUpdatedEventArgs e) in C:\Users\Chad\Documents\Incite Systems\Development\Web Sites\DNN_Dyno\DesktopModules\Incite\The Dyno Room\Controls\MyGarage.ascx.vb:line 1156 
+0

文字列オブジェクト辞書を試す – prabir

+0

ああ、うまくいきました...ありがとうございましたが、今は "値はnullにはできません。パラメータ名:パス"エラーです。だから、 "https://graph.facebook.com/?id=00000000000000&scrape=true"へのPOSTコールと同等のものを達成するには、postメソッドに渡す "path"パラメータがありますか? idとscrapeの値はパラメータを介して渡され、パスの "https://graph.facebook.com/"部分は暗示されているか、すでに正しく組み込まれていますか? –

+0

どのバージョンのsdkを使用していますか?これはv6.0.14で修正されましたhttps://github.com/facebook-csharp-sdk/facebook-csharp-sdk/issues/156 – prabir

答えて

0

Prabirは正しかったです。最新のリリースに更新され...うまくいきました!ありがとう@prabir!

関連する問題