Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Facebook sdk #3477

Open
wants to merge 12 commits into
base: dev
from

Conversation

Projects
None yet
4 participants
@MichaelPetrinolis
Copy link
Contributor

commented Apr 17, 2019

Reorganize directory structure of OrchardCore.Facebook module
Integrate sdk.js
Add predefined Social Plugins as widgets with OrchardCode.Facebook.Widgets feature
Rename OrchardCore.Facebook.Core feature to OrchardCore.Facebook (might break existing sites)
Add a guide how to use the Widgets feature
Widgets defined

  • Like
  • Comments
  • Continue with
  • Chat
  • Quote
  • Save
  • Share

The module defines a FacebookPluginPart that is used to define the widgets. Instead we could add settings to the Liquid Part to define a predefined liquid body and an option to render alternates. Then we could use it in this and any other module that defines widgets this way

@Jetski5822

This comment has been minimized.

Copy link
Member

commented Apr 18, 2019

Do we know what the licensing is for these libs?

@MichaelPetrinolis

This comment has been minimized.

Copy link
Contributor Author

commented Apr 18, 2019

It seems to be like Facebook Login integration. You need a facebook developer account and accept the Facebook's terms and conditions

Copied from https://appsource.microsoft.com/en-us/product/office/WA103354412

The OrchardCore.Facebook.Widgets allows you to install certain social plugins made available by Facebook on your webpages (“Plugins”). Your use of the Plugins is subject to the Facebook Platform Policies and all other applicable terms and conditions as specified by Facebook, which terms may also include a privacy policy. You are responsible for reviewing and complying with all applicable terms specified by Facebook. OrchardCore.Facebook.Widgets is not a party to the license between you and Facebook, and its privacy statement doesn’t apply to treatment of information you may exchange with Facebook when using the Plugins. OrchardCore.Facebook.Widgets isn’t responsible for the Plugins or your use of them, any warranties or claims relating to the Plugins, or customer support for the operation of the Plugins.

@agriffard

This comment has been minimized.

Copy link
Member

commented Apr 26, 2019

@MichaelPetrinolis Have you considered to add a Workflow activity that would allow to publish a message on a Facebook page for example?
Are you aware of which SDK permissions it would imply?
Do you know any useful .NET Core supported Facebook library ?

Similarly, it could be a nice feature to add to the Twitter module: A workflow activity to post a tweet.

@MichaelPetrinolis

This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2019

@agriffard nice idea! After some research, it seems that Facebook provides manage_pages and publish_pages permissions that require app review, but disallows an app to post on behalf of the user. Instead we can use the instant articles which allow the app to publish.(https://developers.facebook.com/docs/instant-articles/api#create)
Unfortunately pages do not work with application tokens, we must implement something in the admin to help and administrator to retrieve a page token for an FB user. In particular, we must get a user token, exchange it for a long lived token and then require a page token that never expires.
I don't know of any .NET Core FB lib, but if we implement such functionality we can do it without adding any dependency.

}
}

if (script is object)

This comment has been minimized.

Copy link
@sebastienros

sebastienros Apr 27, 2019

Member

What have you done @Jetski5822

<fieldset class="form-group">
<label asp-for="Liquid">@T["Body"]</label>
<textarea asp-for="Liquid" rows="5" class="form-control content-preview-text"></textarea>
<span class="hint">@T["The body of the content item, in Liquid format."]</span>

This comment has been minimized.

Copy link
@sebastienros

sebastienros Apr 27, 2019

Member

The body of what?

templateContext.MemberAccessStrategy.Register<FacebookPluginPartViewModel>();
await templateContext.ContextualizeAsync(shapeDisplayContext.DisplayContext);

using (var writer = new StringWriter())

This comment has been minimized.

Copy link
@sebastienros

sebastienros Apr 27, 2019

Member

There is a helper that already does this for you, and also pools the buffers

@sebastienros

This comment has been minimized.

Copy link
Member

commented Apr 27, 2019

We definitely need a demo, but it even has a guide, so it can't be bad

@agriffard

This comment has been minimized.

Copy link
Member

commented Apr 29, 2019

@domonkosgabor has tried it and included screenshots here: https://orcharddojo.net/blog/this-week-in-orchard-04-26-2019

moved facebook menu to first level
add info that tenant will be reloaded if login settings change
fix issues from code review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.