Hey everyone,
I’m working on a Spotify app and I’ve run into a problem. I’m trying to post to Facebook from my app, but it’s not working out.
Here’s what I’ve done so far:
- Set up my Spotify developer account
- Got an access token using the Spotify library
- Tried to use $.post() with the access token to post to Facebook
But nothing’s happening! The post just won’t go through. I’m scratching my head here.
Has anyone else faced this issue? Any ideas what might be causing it? Maybe I’m missing a step or there’s a permission problem?
I’d really appreciate any help or tips. Thanks in advance!
I’ve encountered this issue before. The key is understanding that Spotify and Facebook use separate authentication systems. Your Spotify access token won’t work for Facebook actions. You’ll need to implement Facebook’s SDK and obtain a Facebook access token specifically for posting. This involves setting up your app in the Facebook Developer portal, configuring the necessary permissions, and handling the OAuth flow. Once you have the correct Facebook token, you should be able to post successfully using their Graph API. It’s a bit more involved than just using jQuery’s $.post(), but it ensures proper authentication and permissions.
yo grace, i had similar probs. spotify tokens dont work for fb posts directly. u need to use fb’s api and get a separate fb access token. check out fb dev docs, they explain the whole process. good luck with ur app!