Anybody familiar with FB share API?

oh brother… am going crazy here… I can’t find any forum where one can get help on FB API…
here there’s nothing for developers, only FB users…

right now on a test pg I tried to share I got an error that the url I want to share can’t be shared b/c I haven’t “added” the domain to my “app”… I go to “my Apps” page, go to “settings” I see a field there for “App domains” I put my domain in and when I hit “save” I get this alert:

App domains must match the domain of the Secure Canvas URL, Mobile Site URL, Unity Binary URL, Site URL or Secure Page Tab URL. Please correct these domains: [and it shows the domain I want to add]

if anyone is familiar with this and can offer any help I would appreciate it…
(or point to me any place where I can get help, I mean, ask questions…)

thank you very much…

You’re looking in the wrong direction again.

Have you tried https://developers.facebook.com? Because that’s where you should be adding your app. Not in the “Apps” tab in the settings of the cog icon on the main Facebook domain.

thank your for your response, spaceshiptrooper…

“adding your app…”

what do you mean exactly… what I need to do is add the domain… is this what you mean? I already have my FB app ID and everything… but it looks like for every domain you want to be able to share that domain has to somehow be “registered” with them…

now there are much simpler ways to share, which is what I had initially done… like this…
<a id="fb" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $encURL; ?>">share on Facebook</a>

however, this gives you no control as to how the shared pg shows on yr FB timeline… it included copy there I didn’t want, and it didn’t include the content in <h1>...</h1> which I found pretty incredible…

so I researched this a bit and found there are other ways of doing this… albeit much more complicated, but well, I assumed I should be able to figure it out…:wink:

these are the two pages I looked at mostly…

(with what’s here I was able to share, but again, didn’t like how it displayed…)

with this one, FB.ui({.....}); I got the feeling I could get the most control (I looked into this and found, mostly looking @ SO threads, that there are a no. of params you can put there (title, description, etc…) for example
http://stackoverflow.com/questions/22377724/facebook-share-via-fb-ui
but this is the one where I run into the problem of adding the domain… here’s a test page www.fotoartepuertovaras.cl/share-test-2.php
if you hit “share on Facebook” here is where you get that alert about adding the domain… I don’t know where to add this domain (what url…)

sorry for longuish answer… but… am hoping for answers myself…;~)) my site is ready to roll now, but I haven’t “published it” yet (sent the urls to people, posted it on FB, etc…) b/c I want to have the social-media sharing stuff ready first (and I still have to do Twttter, Pinterest, Instagram… but I’ll be happy if I can get FB and TW to work… if I can get those two to work I’ll release it…)

thanks again, spaceshiptrooper…

The next parameter is what is causing it. I don’t know where it’s coming from, but that’s the problem. If you remove it, you can see that it works. I don’t use much of Facebook’s API so someone else might be able to help you out.

the “next” parameter"??? I don’t know what you mean… I don’t even have the word “next” in
www.fotoartepuertovaras.cl/share-test-2.php

thank you spaceshiptrooper…

If you click on your “share” link, in the URL, there’s a next parameter.

https://www.facebook.com/v2.8/dialog/share?app_id=___&display=popup&e2e=%7B%7D&href=http%3A%2F%2Fwww.fotoartepuertovaras.cl%2Fshare-test-2.php&locale=en_US&mobile_iframe=false&next=http%3A%2F%2Fstaticxx.facebook.com%2Fconnect%2Fxd_arbiter%2Fr%2Fao6eUeuGXQq.js%3Fversion%3D42%23cb%3Df264b08fa23ac76%26domain%3Dwww.fotoartepuertovaras.cl%26origin%3Dhttp%253A%252F%252Fwww.fotoartepuertovaras.cl%252Ff7cf816d31e92e%26relation%3Dopener%26frame%3Df2d56ad1b462c8a%26result%3D%2522xxRESULTTOKENxx%2522&sdk=joey&version=v2.8
                                                                                                                                                                                              ^
                                                                                                                                                                                              Right Here

In your actual page source, I don’t see any next parameter, but I am not sure where it is coming from.

oh brother… I never even thought of looking at that URL… well, I have no idea how that gets there… at any rate that little window (an iFrame, I believe) says I have to “add” my domain “the App Domains field in your app settings…” I guess I need to find where that is… ok… thank you very much…

I found where to add the domain, but when I do so and hit “save changes” I get this alert:

App domains must match the domain of the Secure Canvas URL, Mobile Site URL, Unity Binary URL, Site URL or Secure Page Tab URL. Please correct these domains: www.fotoartepuertovaras.cl

it’s just ridiculous how complicated this is, just to be able to share a page… :frowning:

It’s complaining about the next parameter. If you just take the hard coded URL, and remove the next parameter, you’ll see that the URL seems to work. Now, you just have to find where the next parameter is being set. It could possibly be in your PHP code or it could also be in the App settings. You have to double check everything to make sure that the next parameter isn’t really there because that’s what is actually stopping everything from working and the reason why you keep seeing

App domains must match the domain of the Secure Canvas URL, Mobile
Site URL, Unity Binary URL, Site URL or Secure Page Tab URL. Please
correct these domains: www.fotoartepuertovaras.cl

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.