Skip to Content
Menú
This question has been flagged
340 Vistes

my api end point for facebook auth, sample code is given. the redirect url changed to odoo base url istead of face book url. I am not getting the facebook OAuth login page. Please help

@http.route('/meta_login', auth='public', type='http', website=True)

    def meta_login(self, **kwargs):

        encoded_redirect_uri = quote(self.REDIRECT_URI, safe='')

        auth_url = (

            f"https://www.facebook.com/v21.0/dialog/oauth?"

            f"client_id={self.FACEBOOK_APP_ID}"

            f"&redirect_uri={encoded_redirect_uri}"

            f"&scope=pages_manage_metadata,pages_messaging,pages_read_engagement"

        )

        #print("Redirecting to:", auth_url)  # Debugging



        return request.redirect(auth_url)

Avatar
Descartar