Giter Site home page Giter Site logo

Comments (28)

michaeljoyner avatar michaeljoyner commented on September 16, 2024

Hi @OtiZ2 sorry to hear you are having issues. Can I ask which version you are using?

from laravel-instagram-feed.

OtiZ2 avatar OtiZ2 commented on September 16, 2024

Hi,
"laravel/framework": "^7.0",
"dymantic/laravel-instagram-feed": "^2.6",

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

Okay, thanks. And have you added your Instagram account as a test user?

from laravel-instagram-feed.

OtiZ2 avatar OtiZ2 commented on September 16, 2024

image

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

Alright, great. Next step is to check if there is anything in the logs which can give us more info. The package should log the error.

from laravel-instagram-feed.

OtiZ2 avatar OtiZ2 commented on September 16, 2024

In the /storage/logs/laravel.log is just this

image

This call return the error message
image

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

Yes, that makes sense. What domain are you starting the auth request from? Is this on your dev environment?

from laravel-instagram-feed.

OtiZ2 avatar OtiZ2 commented on September 16, 2024

I try localhost, and production domain.
Same result.
https://lulu.upcyklovane.com/instagram/auth/callback

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

Okay. The problem seems to be that there is somehow a difference between the redirect_uri sent when starting the auth process, and when exchanging the code for a token. Can you possibly show me your config file?

from laravel-instagram-feed.

OtiZ2 avatar OtiZ2 commented on September 16, 2024

Config file
image

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

Ho @OtiZ2 have you managed to have any progress on this? I can't any issues with your config file. I have just tested with a fresh Laravel install and a fresh Instagram/FB app and it worked fine, so I'm not sure what to suggest. What do you have set as your APP_URL in your .env file?

from laravel-instagram-feed.

OtiZ2 avatar OtiZ2 commented on September 16, 2024

This is from .env
image

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

Hi @OtiZ2 Sorry for the late reply, I was away. Unfortunately I cannot think of what the problem is. The only idea I currently have is for you to manually edit the redirectUriForProfile method in the Instagram.php file in the package, and log out the value of the url before it is returned. That method gets called twice in the OAuth process, and the value it returns should be the same, but it seems that in your case it is not. Maybe by logging it and checking what value is returned we can find something useful.

private function redirectUriForProfile($profile_id)
{
$base = Config::get('instagram-feed.base_url') ?: Config::get('app.url');
$base = rtrim($base, '/');
return "{$base}/{$this->redirect_uri}";
}

from laravel-instagram-feed.

OtiZ2 avatar OtiZ2 commented on September 16, 2024

Hi, this is log output:
[2021-08-09 08:29:04] production.ERROR: redirectUriForProfile: {https://lulu.upcyklovane.com}/{instagram/auth/callback}

[2021-08-09 08:56:15] production.ERROR: redirectUriForProfile: {https://lulu.upcyklovane.com}/{instagram/auth/callback}
[2021-08-09 08:56:15] production.ERROR: https://lulu.upcyklovane.com/instagram/auth/callback
[2021-08-09 08:56:16] production.ERROR: Instagram auth error: unknown error message

image

image

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

Hmmm, that seems all correct. Can you please send a screenshot of the original error you are getting.

from laravel-instagram-feed.

julianlaibach avatar julianlaibach commented on September 16, 2024

Hey, thank you for your greate Package! Im facing the same Issue on my local development... Seems to have nothing to do with the Redirect URL if i change it than i get an Error response before authenticating. Did you found a Solution on this?
On the Facebook Site im using the Instagram Basic Display App, is this the right one?
Thank you!

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

HI @julianlaibach, sorry you experiencing issues. I'm not sure if @OtiZ2 ever found a solution for the above. Can you tell me a bit more about your setup and everything (what dev environment you are using, what version of this package and Laravel, etc) and I can try assist you. Have you also added yourself as a test Instagram user on the Facebook app you created? Yes, Instagram Basic Display is the correct one.

from laravel-instagram-feed.

julianlaibach avatar julianlaibach commented on September 16, 2024

Hi Michael,
thank you for your Response!
As a Dev environment i use a Docker Container.
I also have a SSL Certificate on the Local URL.
The Package Version is 2.6
The Laravel Version is 8.0
Both the URL in the config and the URL at Facebook are the same.
Yes i also added the Test user and verified it in my Instagram Account.
Its somehow strange because i dont know what to do else, i think i tried everything @OtiZ2 did you found a Solution for this Problem?
Thank you!

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

Hi @julianlaibach can you share a screenshot of the error you are getting?

from laravel-instagram-feed.

julianlaibach avatar julianlaibach commented on September 16, 2024

Sorry for my late reply...
Here is everything from the Log File:

[2021-09-13 18:54:00] local.INFO: redirect URL: https://barth-fs.test/instagram/auth/callback
[2021-09-13 18:54:17] local.INFO: redirect URL: https://barth-fs.test/instagram/auth/callback
[2021-09-13 18:54:17] local.ERROR: Instagram auth error: unknown error message

Im not sure what exactly causes this, i tried nearly everything, also on production...
The only thing im not sure about is do i need to do the App Review on Facebook? Also if i added the Account to the Test Users
Thank you!

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

HI @julianlaibach no worries. Do you see an error of any sort during the auth process? The error logging in this package is not so robust, and isn't providing enough info for the error. It would be helpful if I could see the actual error or response you get during the auth process.

I don't think facebook app needs to go through App Review, just make sure it is live, and you have set up the Instagram account as a Test Instagram User, and approved the request from Instagram.

from laravel-instagram-feed.

julianlaibach avatar julianlaibach commented on September 16, 2024

Hi Michael, so i think maybe im a bit closer...

[2021-09-14 06:53:06] local.ERROR: Exception: Dymantic\InstagramFeed\Exceptions\AccessTokenRequestException: Client error: POST https://api.instagram.com/oauth/access_token resulted in a 400 Bad Request response: {"error_type": "OAuthException", "code": 400, "error_message": "Error validating verification code. Please make sure you (truncated...) in /var/www/html/vendor/dymantic/laravel-instagram-feed/src/Profile.php:62

This is what i'm getting if i Log the Exception in AccessTokenController / handleRedirect
If i google the Error i get the same hint as mentioned from you, the Redirect URI but i tested and im sure that those both match...

Do you have any thoughts on it?
Best
Julian

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

H @julianlaibach, sorry about the late reply. I am at a bit of a loss, I can't really find any new information about this, and I can see from your logs above that the redirect_uri is the same, so I can't see where the problem is. One idea, but it is a bit of a stretch, is that I give you the API key and secret for a FB/Instagram app that I know is working, and add your IG account as a test user, and see if the error is the same. At least this will be able to rule out whether it is an issue on the Facebook settings side, or something with the package.

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

I'm going to close this for now, if anyone has a similar issue please open a new issue.

from laravel-instagram-feed.

OtiZ2 avatar OtiZ2 commented on September 16, 2024

hi everyone, sorry for late reply.
No do not find any solution for this yet.

from laravel-instagram-feed.

michaeljoyner avatar michaeljoyner commented on September 16, 2024

Hi @OtiZ2 I can only offer you the same thing as I offered @julianlaibach above, where you can try your setup using a FB app that is known to work

from laravel-instagram-feed.

ley-288 avatar ley-288 commented on September 16, 2024

Had this problem using same versions. Personally had to install this package manually without composer and ran into multiple problems. Resolved this issue by manually adding Dymantic Package to Bootstrap cache Packages.php & Services.php.

from laravel-instagram-feed.

omarherri avatar omarherri commented on September 16, 2024

I did run into the same problem, so i removed the app from the connected applications in Instagram.

You can follow also this guide: https://smashballoon.com/doc/instagram-api-error-message-reference/

from laravel-instagram-feed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.