简体   繁体   中英

Facebook SDK for .NET - Search keywords in public posts

I'm trying to search for a specific keyword in public posts using facebook c# sdk, and then list all the results with the name of the user who posted it, time when it was posted and the post itself.

The problems I'm having is.. well.. I cannot wrap my head around the SDK really.

What I want is really simple, and I can achive what I want using: https://graph.facebook.com/search?q=watermelons&type=post

So my question is; Can this be done using the Facebook SDK .NET?

Or have I misunderstood the concept of the SDK completely?

I'm thankful for any help!

Alright, I solved it - I'm not sure if it's a good solution at all... But it seems to work:

            var client = new FacebookClient();
            string searchKeyword = keyWord;
            dynamic result = client.Get("/search?q=" + searchKeyword + "&type=post");     

It works alright, but It's not very sexy. I hope someone else will find it useful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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