Giter Club home page Giter Club logo

skybrud.social.facebook's Introduction

Skybrud.Social.Facebook GitHub license NuGet NuGet

Skybrud.Social.Facebook is a .NET wrapper and API implementation for the Facebook Graph API.

The package helps handling some of the underlying authentication as well as communicating with both APIs in a strongly typed way.



Target Frameworks

.NET Standard 1.3, .NET Standard 2.0 and .NET 7 (read more).



Installation

Install the NuGet package - either via the .NET CLI:

dotnet add package Skybrud.Social.Facebook --version 1.0.0-beta006

or the NuGet package manager:

Install-Package Skybrud.Social.Facebook -Version 1.0.0-beta006



Found a bug? Have a question?



Changelog

The releases page lists all releases, and each there will be some information for each release on the most significant changes.



Documentation

You can find documentation and examples on how to use this package at the Skybrud.Social website. The package isn't yet fully documented, so feel free to create an issue if I've missed something.

skybrud.social.facebook's People

Contributors

abjerner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

skybrud.social.facebook's Issues

Update the users endpoint

  1. The implementation should be based on and tested with v2.8 of the Facebook Graph API

  2. Obsolete and deprecated code should be removed

  3. etc.

Fix "events" endpoint

  • Currently the GetEvent method only supports specifying the ID of the event, but not any other parameters - eg. which fields should be returned by the API.

  • The GetEvents method does support specifying other parameters through the FacebookGetEventsOptions class as a second parameter, with the ID of the event being the first. However to follow the new the rest of the package, the ID should be included in the options class rather than having it's own parameter in the method.

The same goes for v0.9.x of Skybrud.Social...

Update the likes endpoint

  1. The implementation should be based on and tested with v2.8 of the Facebook Graph API

  2. Obsolete and deprecated code should be removed

  3. etc.

Update the pages endpoint

  1. The implementation should be based on and tested with v2.8 of the Facebook Graph API

  2. Obsolete and deprecated code should be removed

  3. etc.

Update the photos endpoint

  1. The implementation should be based on and tested with v2.8 of the Facebook Graph API

  2. Obsolete and deprecated code should be removed

  3. etc.

Access facebook reviews

Hope you could point me in the right direction to display a page's facebook reviews. Struggling to find anything in the api. Thank you.

Update the albums endpoint

  1. The implementation should be based on and tested with v2.8 of the Facebook Graph API

  2. Obsolete and deprecated code should be removed

  3. etc.

Update the debug endpoint

  1. The implementation should be based on and tested with v2.8 of the Facebook Graph API

  2. Obsolete and deprecated code should be removed

  3. etc.

Update the comments endpoint

  1. The implementation should be based on and tested with v2.8 of the Facebook Graph API

  2. Obsolete and deprecated code should be removed

  3. etc.

An active access token must be used to query information about the current user.

I use Skybrud.Social v0.9.5.0:
Exception:Skybrud.Social.Facebook.Exceptions.FacebookException: An active access token must be used to query information about the current user.
at Skybrud.Social.Facebook.Responses.FacebookResponse.ValidateResponse(SocialHttpResponse response, JsonObject obj)
at Skybrud.Social.Facebook.Responses.Users.FacebookUserResponse.ParseResponse(SocialHttpResponse response)
at MVCForum.Website.Controllers.OAuthControllers.FacebookOAuthController.FacebookLogin()

Update the links endpoint

  1. The implementation should be based on and tested with v2.8 of the Facebook Graph API

  2. Obsolete and deprecated code should be removed

  3. etc.

Post photo to group

Hi. Could you help me to find a way to post photo to group album via Skybrud.Social.Facebook?

Graph Api

Hello, how can I capture conversions on Facebook?

Update the feed endpoint

  1. The implementation should be based on and tested with v2.8 of the Facebook Graph API

  2. Obsolete and deprecated code should be removed

  3. etc.

Update the posts endpoint

  1. The implementation should be based on and tested with v2.8 of the Facebook Graph API

  2. Obsolete and deprecated code should be removed

  3. etc.

Update the apps endpoint

  1. The implementation should be based on and tested with v2.8 of the Facebook Graph API

  2. Obsolete and deprecated code should be removed

  3. etc.

Update the accounts endpoint

  1. The implementation should be based on and tested with v2.8 of the Facebook Graph API

  2. Obsolete and deprecated code should be removed

  3. etc.

Get Posts from a managed Page without login on Facebook

I manage a Facebook page and I with to get post on the site.
I'm able to get post putting in the page access token taken from Facebook Api Explorer, but this is not the good manner.
So by code, I'm able to get app token but not to get page token without pass fb auth page to get active auth token.
How to retrieve the posts by code?

My code:

FacebookOAuthClient client = new FacebookOAuthClient(appId, appSecret);

// Get an app token for the application (makes a call to the Facebook API)
  Skybrud.Social.Facebook.Responses.Authentication.FacebookTokenResponse accessToken = client.GetAppAccessToken();

var service = Skybrud.Social.Facebook.FacebookService.CreateFromAccessToken(accessToken.Body.AccessToken);

   

    Skybrud.Social.Facebook.Options.Posts.FacebookGetPostsOptions opt = new Skybrud.Social.Facebook.Options.Posts.FacebookGetPostsOptions()
    {
        Identifier = "xyz",
        Fields = "id,name_with_location_descriptor,feed",
        Limit = 20,

    };
    
     Skybrud.Social.Facebook.Options.Posts.FacebookGetPostsOptions opt2 = new Skybrud.Social.Facebook.Options.Posts.FacebookGetPostsOptions()
    {
        Identifier = "xyz",
        Fields = "fields=id,name_with_location_descriptor,feed{message,created_time,name,full_picture,picture,story,description,from,likes}",
        Limit = 20,

    };

    FacebookService facebookService = FacebookService.CreateFromAccessToken("access_token");


    // Make the request to the API
    FacebookGetPostsResponse responseFB = facebookService.Posts.GetPosts(opt2);
    
     FacebookFieldsCollection fields = new FacebookFieldsCollection(
        FacebookPostFields.Id,
        FacebookPostFields.Message,
        FacebookPostFields.Story,
        FacebookPostFields.CreatedTime,
        FacebookPostFields.From,
        FacebookPostFields.Picture,
        FacebookPostFields.Link

    );

     
foreach (var post in responseFB.Body.Data)
    {

        // Write some of the account information to the output stream
        <p>ID: @post.Id</p>
        <p>Name: @post.Name</p>
        <p>@post.Description</p>
        <p>@post.CreatedTime</p>
        <p>@post.Link</p>
        
          FacebookGetPostResponse response = facebookService.Posts.GetPost(post.Id, fields);

 
    FacebookPost postdata = response.Body;

    <p>ID: @postdata.Id</p>
    <p>Message: @postdata.Message</p>
    <p>Story: @postdata.Story</p>
    <p>Created: @postdata.CreatedTime</p>
        <p>foto: @postdata.Picture</p>
         <p>@postdata.Link</p>
          @postdata.Likes
        <hr />

    }

FacebookOAuthClient.GetAccessTokenFromAuthCode returns null

My Facebook integration stopped working and once I debug I see that the FacebookOAuthClient.GetAccessTokenFromAuthCode stopped returning valid access token and returns instead null. Are there any breaking changes in Facebook's API which could cause this? As I said, this was working flawlessly until now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.