func (provider *FacebookProvider) Get(creds *common.Credentials, endpoint string) (objx.Map, error) {
	return oauth2.Get(provider, creds, endpoint)
}
Get makes an authenticated request and returns the data in the
response as a data map.
package facebook
import (
	"github.com/stretchr/gomniauth"
	"github.com/stretchr/gomniauth/common"
	"github.com/stretchr/gomniauth/oauth2"
	"github.com/stretchr/objx"
	"net/http"
)
const (
	facebookDefaultScope    string = "email"
	facebookName            string = "facebook"
	facebookDisplayName     string = "Facebook"
	facebookAuthURL         string = "https://www.facebook.com/dialog/oauth"
	facebookTokenURL        string = "https://graph.facebook.com/oauth/access_token"
	facebookEndpointProfile string = "https://graph.facebook.com/me?fields=email,first_name,last_name,link,about,id,name,picture,location"
)
type FacebookProvider struct {
	config         *common.Config
	tripperFactory common.TripperFactory
}
func New(clientId, clientSecret, redirectUrl string) *FacebookProvider {
	p := new(FacebookProvider)
	p.config = &common.Config{Map: objx.MSI(
		oauth2.OAuth2KeyAuthURL, facebookAuthURL,
		oauth2.OAuth2KeyTokenURL, facebookTokenURL,
		oauth2.OAuth2KeyClientID, clientId,
		oauth2.OAuth2KeySecret, clientSecret,
		oauth2.OAuth2KeyRedirectUrl, redirectUrl,
		oauth2.OAuth2KeyScope, facebookDefaultScope,
		oauth2.OAuth2KeyAccessType, oauth2.OAuth2AccessTypeOnline,
		oauth2.OAuth2KeyApprovalPrompt, oauth2.OAuth2ApprovalPromptAuto,
		oauth2.OAuth2KeyResponseType, oauth2.OAuth2KeyCode)}
	return p
}
func (provider *FacebookProvider) TripperFactory() common.TripperFactory {
	if provider.tripperFactory == nil {
		provider.tripperFactory = new(oauth2.OAuth2TripperFactory)
	}
	return provider.tripperFactory
}
func (provider *FacebookProvider) PublicData(options map[string]interface{}) (interface{}, error) {
	return gomniauth.ProviderPublicData(provider, options)
}
func (provider *FacebookProvider) Name() string {
	return facebookName
}
func (provider *FacebookProvider) DisplayName() string {
	return facebookDisplayName
}
func (provider *FacebookProvider) GetBeginAuthURL(state *common.State, options objx.Map) (string, error) {
	if options != nil {
		scope := oauth2.MergeScopes(options.Get(oauth2.OAuth2KeyScope).Str(), facebookDefaultScope)
		provider.config.Set(oauth2.OAuth2KeyScope, scope)
	}
	return oauth2.GetBeginAuthURLWithBase(provider.config.Get(oauth2.OAuth2KeyAuthURL).Str(), state, provider.config)
}