Dymantic / laravel-instagram-feed

150 stars 51 forks source link

we need a route that Instagram will redirect the user to once they have given permission. #55

Closed talkwithdeveloper closed 2 years ago

talkwithdeveloper commented 2 years ago

How to create a route in web.php file . we don't have mention any controller and function inside the route ?if not how we will get the "code" from querystring and move further . Route::get('instagram/auth/callback', 'InstgramAuthController'); i am little confuse about to create route after user allow to access his/her account.

michaeljoyner commented 2 years ago

Hi @talkwithdeveloper, you don't need to create the route or controller, the package manages all that for you. You are able to set the routes in the config file if you are using routes that do not match the default. Please see the readme file for instructions.

talkwithdeveloper commented 2 years ago

HI @michaeljoyner , I have read readme file instruction , according to that i have set the config file fields value, but when user allow the permission on instagram URL page and then its come back to redirect url, its show 404 error

michaeljoyner commented 2 years ago

Can you show me your config file?

talkwithdeveloper commented 2 years ago

<?php

return [ /*

michaeljoyner commented 2 years ago

What is set as your APP_URL? If you are using subdomains, your may need to use the 'base_url' option in the config file. See issue 25

talkwithdeveloper commented 2 years ago

yes i am using subdomian

talkwithdeveloper commented 2 years ago

Screenshot_3 Screenshot_3

talkwithdeveloper commented 2 years ago

so in base url what url should i used ? subdomian and domian ?

michaeljoyner commented 2 years ago

Yes, everything that should come before /instagram/auth/callback. So http://subdomain.domain.com

talkwithdeveloper commented 2 years ago

Screenshot_4

talkwithdeveloper commented 2 years ago

I have added but still same error

talkwithdeveloper commented 2 years ago

Got it Thanks @michaeljoyner

michaeljoyner commented 2 years ago

What was the problem?

talkwithdeveloper commented 2 years ago

Problem is i have made folder with name instagram inside the subdomian

talkwithdeveloper commented 2 years ago

I have sent all file to root of subdomian and remove the instagram folder

talkwithdeveloper commented 2 years ago

Screenshot_5

talkwithdeveloper commented 2 years ago

Now its stuck here ...do you have any opinion ?

michaeljoyner commented 2 years ago

You can probably put the entire route (starting from https://) in the config file for the success_redirect

talkwithdeveloper commented 2 years ago

okay

talkwithdeveloper commented 2 years ago

Screenshot_6

talkwithdeveloper commented 2 years ago

Added But same error

michaeljoyner commented 2 years ago

Sorry, you don't need to use the whole route. You need to create the route and view for these on your own, the package just redirects to the route you define in your config. From your screenshot above, everything is fine. In your routes file you need to create the 'instagram-auth-success' route and handle it how you want.

talkwithdeveloper commented 2 years ago

Okay Thanks