This morning I found out that Facebook is not returning the fb_ref parameter when you add it to links in actions or likes. Instead they seem to have replaced it with a series of new parameters: action_ref_map, action_object_map, ...
Could someone confirm me this change? This is breaking our software.
EDIT
This is an example that I've found:
http://uk.omg.yahoo.com/news/john-travoltas-year-gay-affair-pilot-revealed-122446486.html?fb_action_ids=10151047496853334&fb_source=other_multiline&action_object_map={%2210151047496853334%22%3A10151788645595106}&action_type_map={%2210151047496853334%22%3A%22news.reads%22}&action_ref_map={%2210151047496853334%22%3A%22type%3Aread%2Cuser%3A1k-WK59_Yk-EnPq2w1zMLBjX7nA%22}&code=AQCH-sq6XRSQCXj4QNkKlnusWLgIvBaZduNhGO0RNdiXgfCSGUOd1qinfHVw1iFQfs-0KVxFdPpWXD9nWrjEC1naU87H5W4GnxnTPL5j2raksea2pFxuy0rtgSpAa6ExZYCc7PkzIyjNnGTdK6N7g0Spb7qiqSboTgWZOojQJYbEF2XHenlROjhP8--NkvzrxU8#_=_
EDIT 2
It seems that Facebook has activated a new system for returning "fb_ref" in sandboxed FB apps.
https://developers.facebook.com/docs/fb_source/ is (and should be) the primary source of referral information and open graph actions have always had their own referral parameters showing which actions were present in the story/aggregation which triggered the click
fb_ref is provided when you had a 'ref' parameter on the source publish but as far as i know there hasn't been a change there
(e.g. like button with ref = foo results in a click back to your app with fb_ref=foo, fb_source=ticker or something like that)
Related
I'm trying to deeplink users into my facebook messenger bot, and I need to pass some data in at the same time. Supposedly this can be done by using m.me links, along with a query param.
My bot's page is https://www.facebook.com/Willy-1610141399078870/
The m.me url would be something like this. https://m.me/Willy-1610141399078870?ref=somedatagoeshere
The m.me link works to a degree on desktop, but the data isn't passed to the bot. I don't particularly need it to work on desktop.
However, when I try to open that link on ios or android, I get an error message.
Android
This user name doesn't exist. Try another code or link
iOS
Username was not found
The bot hasn't been published yet, so it won't be visible to anyone else. I need to be able to test this functionality before I publish, so I hope that's not what is causing the failure.
Has anyone else been able to use this feature?
It seems that the facebook-generated username can't be used for m.me links. It requires you to register an explicit username.
My page's generated name was Willy-1610141399078870, so https://m.me/Willy-1610141399078870 wasn't a valid url.
To register a username for your page, go to your page > About > Create Page #username.
Then, you can attempt to pick a username that isn't already taken. Somehow, #willy-the-test-page is already taken (?), so I got this incredibly confusing error message:
Taking the error message at face value, I decided to create another page and try again. This time, realizing that the message didn't mean what it said. Picking an available username clears the error message, and allows registration.
Just kidding! It will tell you again that the page isn't eligible.
The solution was to create a totally new page, and go through the #username creation flow again. It worked for me on the second attempt.
It's rumored that a page needs at least 25 likes to become eligible for an #username, but this isn't true in all cases.
I have a site with smart-urls that lets you build up a dynamic url based on some user interaction. I devised a button using sharer/sharer.php?u=someurl.
EDIT: ** SomeUrl is a shortened-url ( using bit.ly)
The thing is sometimes someurl gets ignored and the post links to some other url ( which is the one defined on the og:url of the site). This happens somehow randomly.
href = href.replace('|u|',shareHref).replace('|t|',t).replace('|140|',t.substring(0,130))
window.open(href,'t','toolbar=0,resizable=1,status=0,width=640,height=528');
Any thoughts?
So, I've finally switched to FB.ui dialogs. The docs say sharer.php works only with ?u parameter but I've found it impossible to fix the bug mentioned above. If you're struggling with sharer, consider using FB.ui is fairly easy to integrate.
copy pasted the exact code from https://developers.facebook.com/docs/opengraph/getting-started/ , changed the appid. Yesterday it used to work..now..not so much.any idea?
Check the settings for your Open Graph action.
Go to the Open Graph Dashboard for your app on Facebook Developers.
Click on the Read action.
Click the Advanced link.
Make sure that Allow Multiple is selected for the setting called Unique action.
Salon owners can create an account with their salon information on our platform and they get a page that they can use as a tab app.
I want to be able to serve all these pages from one app instead of having to install each one seprately and I also want to make the life of the salon owner easier by helping them to install the tab.
I know about the link I can create to help them install the app and I know that when a visitor visits the app that facebook will send the page ID. So far so good.
https://developers.facebook.com/docs/appsonfacebook/pagetabs/
But how do I make sure that when the salonowner follows the link to install the app that I get the page ID back (through callback or other) so that I can register which page ID belongs to which salon account.
I've read sone 2011 article about a callback but I can't find any recent info on this.
I think it should be possible as a lot of sites offer easy fb apps to businesses.
Any help would be welcome!
EDIT: Could this last piece of info in the Facebook link above be used to do this? I don't quite get it yet.
In addition, your app will also receive a string parameter called app_data as part of signed_request if an app_data parameter was set in the original query string in the URL your tab is loaded on. It could look like this: "https://www.facebook.com/YourPage?v=app_1234567890&app_data=any_string_here". You can use that to customize the content you render if you control the generation of the link.
Well... Preventing users from adding your application to their page is impossible. You can't prevent that.
What you will be able to do is to detect who has added your application and according to that, change the content (or not display it at all). So you'll have to start with a list of "allowed" page_ids to match to the accounts you want.
Your application will receive a signed_request each time a user arrives at your application (within a page). Inside that signed_request is information not only on the user but also on the page that the application is on (provided it is a page tab app).
Once you have obtained the signed_request, it will hold a page key which contains:
A JSON object containing the page id string, the liked boolean (set to
true if the user has liked the page, false if not) and the admin
boolean (set to true if the user is an admin of the page, false if
they're not). This field is only present if your app is being loaded
within a Page Tab.
So you'll be able to access the page_id from within this variable and make a decision on the type of content you want to be displayed.
Ok, after running some tests I found out that when you add a URL as 'next' parameter to the install URL Facebook will send the admin(user) back to this URL while adding an array to the request containing all the page Id's the app was installed to.
Like this: YOUR_CALLBACK_URL?tabs_added[ID]=1
Proved to be quite easy in the end
I think there are a few similar questions that seem to suggest using app_data in the signed request (http://developers.facebook.com/docs/authentication/signed_request/) but I'm not sure if it will be possible to do what I am trying to achieve with it as I've never used it before.
If I have my Facebook 'Tab' Url as follows:
http://www.facebook.com/pages/PAGE_TITLE/PAGE_ID?sk=app_APP_ID
What I want to do is add an extra parameter on the end as follows:
&WT.mc_id=email-uk-8014
The reason for this is for tracking purposes and links will be sent out of the form
http://www.facebook.com/pages/PAGE_TITLE/PAGE_ID?sk=app_APP_ID&WT.mc_id=email-uk-8014
and the extra parameter will allow us to track the campaign id.
As you can see I have no way of knowing the value of the parameter beforehand as it depends on the link clicked by the user so is it possible to somehow get the value of the WT.mc_id parameter inside my iframe app?
app_data is the only parameter passed through other than the page ID and user's basic details (locale and if they do/don't like the page) - you'll need to use that for any sort of campaign tracking (or link elsewhere and redirect to the tab after capturing your analytics data)
you can pass get variables in facebook but only in canvas application
you just have to use $_REQUEST['xxx'] to retrieve the data.
you should not pass the param in href of facebook. Instead just make linking inside your app so that you can track the events. As you will be in iframe and having complete control you can do same on your own site.