Replies: 6 comments 2 replies
-
Yes, I would really like to get this functionality as I don't know how to use next auth at the moment while using facebook login for business |
Beta Was this translation helpful? Give feedback.
-
Dear @wbrijesh how are you? Do you need help to implement that? I don't know how can I help you but I'm willing too. |
Beta Was this translation helpful? Give feedback.
-
Any solution? |
Beta Was this translation helpful? Give feedback.
-
You can create your own custom provider. const FacebookBusinessProvider = {
id: "facebook_business",
name: "Facebook for Business",
type: "oauth",
authorization: {
url: "https://www.facebook.com/dialog/oauth",
params: {
scope:
"pages_show_list ads_management business_management pages_read_engagement pages_manage_posts email",
},
},
token: {
url: "https://graph.facebook.com/oauth/access_token",
},
userinfo: {
url: "https://graph.facebook.com/me",
params: { fields: "id,name,email,picture" },
async request({ tokens, client, provider }) {
return await client.userinfo(tokens.access_token!, {
// @ts-expect-error
params: provider.userinfo?.params,
});
},
},
clientId: env.FACEBOOK_CLIENT_ID,
clientSecret: env.FACEBOOK_CLIENT_SECRET,
profile(profile) {
return {
id: profile.id,
name: profile.name,
email: profile.email,
image: profile.picture.data.url,
};
},
} satisfies Provider; |
Beta Was this translation helpful? Give feedback.
-
Hello guys! I need help with implementing Facebook login for business! I almost build most of it, but I am receiving Application Error and can't figure out what am I missing! My code: Facebook/views.pyimport logging load_dotenv() logger = logging.getLogger(name) Environment variablesFACEBOOK_REDIRECT_URL = os.getenv('FACEBOOK_REDIRECT_URL') @login_required @login_required
def messenger(request):
{{ message }}<script> // Automatically redirect after a few seconds setTimeout(function() { window.location.href = "{% url 'messenger' %}"; }, 5000); // 5 seconds delay </script> `After Connecting to the Facebook, it is not redirecting me to the success.html page but instead I receive a Application error at this url in chrome: What can I do to solve this problem? |
Beta Was this translation helpful? Give feedback.
-
Passing
Not sure any other form of explicit support for 'Facebook Login for Business' is needed. But an example in the documentation would be very handy. |
Beta Was this translation helpful? Give feedback.
-
Description 📓
There are two types of facebook apps, 1. login with facebook 2. business
In business apps you can add login for businees to get access to some feature, in my case ads_read and ads_management permissions
Purpose of the feature
Potential problems
Potential alternatives
How to reproduce ☕️
Contributing 🙌🏽
Yes, I am willing to help implement this feature in a PR
Beta Was this translation helpful? Give feedback.
All reactions