How to override event URL in Facebook pixel - facebook

Does anyone know how we can change the event URL(Pixel Location) in Facebook pixel?
I have a couple of pages on my website that contains personal information as a query string(PII), as you better know it's forbidden to send PII information to Facebook. Recently I received a warning from Facebook to stop collecting PII. Since this information is being collected automatically from the page URL I don't know to override this URL:
In Facebook conversion API we can make it by adding "event_source_url" please help me with client-side pixel.
Thank you

I don't think you can override it but the only possible way that I've tried and actually worked no script tag debug is to use the NoScript FB pixel instead, for this particular case since you are using the conversions API, I think you can add the event ID for the deduplication, once done, you have to remove the JS pixel counterpart, that's the fix I found for now.

Related

facebook graph page/picture edge returning questionmark

So this is a little bit odd, I have a website that trawls facebook looking at specific pages and requesting data from them.
As part of this I request the picture object of the page: http://graph.facebook.com/285361880228/picture
This returns a question mark instead of the page profile picture.
Other links to pages seem to work without a problem.
http://graph.facebook.com/1485760851674064/picture
Does anyone know what may be causing this?
I am currently using version 2.3 of the API.
I'm assuming it has something to do with the page setup, as according to the facebook documentation,I should be able to read this.
https://developers.facebook.com/docs/graph-api/reference/v2.3/page/picture/
It seems like the facebook page has not been published. Try publishing the page and access the image using same link. It will work.

Publishing Location-aware Post via Graph API

It is my understanding that the Post object is now Location-aware.
However, I can't seem to find documentation on how to publish location-aware Posts via the Graph API.
My app is currently publishing Checkins that reference a Place - but I would like to migrate to location-aware Posts since Places are being deprecated.
I understand that Checkins are sticking around, and that they will now reference a Page instead of a Place, but, unless I'm mistaken, the Page ID reference is still mandatory, and I am in need of my location-aware post/checkin having an optional Page reference.. hence my desire to move to Posts that have location capabilities.
Please let me know if I am incorrect in any of my assumptions..
I tried finding these questions, but none of them seem to hit exactly on the things I needed to know.
Thanks so much!
So you can now add location to posts and photos:
http://developers.facebook.com/blog/post/2012/03/07/building-better-stories-with-location-and-friends/
However I think this location is still added by giving a place ID or page ID (I'm not sure which, actually.) But I think you're asking if you can add location without a place/page ID? Personally I would like to do this as well, e.g. use lat/lon coords.
When you post through facebook proper, it can automatically add your general location (e.g. "near [nearest city/municipality]") however I don't see a way to achieve the same thing through the FB API.
You can't currently attach a location to a post via the graph api. Keep an eye on the Facebook developer blog to see if that changes.

Strange Access Token returned from Facebook

I have been working on Facebook app and I have been using Facebook Graph Toolkit for months and all the while, MY CODES are working (I can get Access Token, and I can use them to retrieve Facebook user details, publish news feed, etc)
Now, there's new problem arise that I never expect it to happen and didn't know what is wrong with Facebook!
I have been following my old set of codes and discovered that Facebook now returns back Access Token that is not in this format (which is the correct format all the while I'm using, it is even the same format found in this page
|c4e304f814362ec6b6dd823a.1-|LeRzWafqGjfriGabNmmOU4U07Pw
Now, I've been getting the format like this
AAABddZAETAbYBAKNESQCdiZC2ojQOjSAIHfFCBFtn99wUYC448po2FN4VrvempAQVnUaBwJb9Qxwg6j9uegLZAeaZA4vmh503bHkUIsj1hIl1ZCvCbZBkz&expires=6204
Anyone knows what happen??
This is the new style access_token. You can see it working by visiting this link:
https://graph.facebook.com/me?access_token={access_token from your question}
This change has been advertised on the Facebook dev blog:
https://developers.facebook.com/blog/post/497/
...
https://developers.facebook.com/blog/post/555/
I can't, however, yet answer why the style of the access_token has changed, because the documentation hasn't been updated yet to show this change: https://developers.facebook.com/docs/authentication/
Note: I suggest you remove the access_token from your question, as it means others are able to access your data!
This looks to be the new encrypted access token that Facebook is moving to. Will probably be the norm. If you were previously parsing it for different bit's of info you'll probably need to change to decoding it.

Getting facebook profile picture

i need to get the facebook profile picture of anyone by passing their id. But i no need to use facebook API or Graph anything else.. Just i need to give the url with that id.. Is it possible to get the profile picture in this way? I tried in google but i didnt get it. If anyone knows this please respond me...
Well, I think the only options available are:
https://graph.facebook.com/[PROFILE_ID]/picture (You can include this URL inside a tag and it will work).
Scrap yourself the page corresponding to the profile, i.e. http://www.facebook.com/profile.php?id=[PROFILE_ID] and get the URL of the picture there.
I would suggest you to use the first one, because it gives you more flexibility about the picture size (?type=small, ?type=thumbnail, etc).
Edit
Keep in mind that this answer is from 2011, and Facebook makes changes in its APIs frequently.
Apart from using Graph API as already mentioned above (https://graph.facebook.com/[PROFILE_ID]/picture), there are a couple more ways:
FlipTop has a service that pulls up all sorts of information on Facebook users, including direct CDN URLs (e.g. https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/275588_504804917_147319_n.jpg) of profile pictures. (Link to API documentation)
Cloudinary has a similar service, but with hosting thrown in the mix. They do require you to open an account, but it's free. Then you can use their CDN URL format to link to any picture like this: http://res.cloudinary.com/[YOUR_ACCOUNT]/image/facebook/[PROFILE_ID].jpg (Read more here)

Facebook graph API: feeds missing in json response

I try to fetch user's feeds via graph api from my Android application. It generally works but some feeds that I can see on the wall are missing in the json response.
I call the url http://graph.facebook.com/someUserId/feed, by using the Android Facebook SDK methods, so the access token should be provided automatically, but it's not really relevant I think in my case. Nevertheless fyi, the user of my app is authenticated via OAuth.
I already checked the following:
all the user's feeds are visible to everyone / public (set in privacy settings)
the json response is not cached by my browser
I am aware of paging, but this is not an issue. The problem is not that I am not getting the very oldest feeds but that some feeds are just missing in between.
I registered a new facebook user which is not connected to the user I want to retrieve the wall feeds from, and when I open the respective wall I see all the feeds there, as expected, since they're all public to everyone. Yet, when I open the same related json url unter http://graph.facebook.com/someUserId/feed, some feeds are missing.
This is an example of the problem - since all my posts are public, I can just call the json url directly in a browser to do a test.
I want to get wall feeds from user:
http://www.facebook.com/mathias.lin
Screenshot1: note the 3 marked postings, all posted by myself
and here the json response, as you can see, the 1st and 3rd wall posts are included in the json, but the 2nd post is not. Why?
The related json url is:
http://graph.facebook.com/mathias.lin/feed
I am getting the 'missing' feed when I add an access_token to the url - but why? The posted feed has a privacy setting for 'everyone'?!
This is the missing feed that I get when using the access_token:
{"id":"504063796_485195138796","from":{"name":"Mathias Lin","id":"504063796"},"message":"Photo test upload from Android","picture":"http:\/\/photos-e.ak.fbcdn.net\/hphotos-ak-snc6\/hs021.snc6\/165194_485195123796_504063796_6062399_1841907_s.jpg","link":"http:\/\/www.facebook.com\/photo.php?fbid=485195123796&set=a.485195118796.256450.504063796","name":"Torres Photos","icon":"http:\/\/static.ak.fbcdn.net\/rsrc.php\/yz\/r\/StEh3RhPvjk.gif","actions":[{"name":"Comment","link":"http:\/\/www.facebook.com\/504063796\/posts\/485195138796"},{"name":"Like","link":"http:\/\/www.facebook.com\/504063796\/posts\/485195138796"}],"privacy":{"description":"Everyone","value":"EVERYONE"},"type":"photo","created_time":"2011-01-06T05:10:43+0000","updated_time":"2011-01-06T09:00:23+0000","likes":6,"comments":{"data":[{"id":"504063796_485195138796_3607414","from":{"name":"Mathias Lin","id":"504063796"},"message":"Awesome, photo upload now works as well. Not so much fun working with the Facebook SDK for Android, would have expected more functionality beyond that just very very simple graph api wrapper. But need to be considered that the android sdk development was part of an internship - but since it's it's open source, it can luckily be modified. Which has to be done due to some bugs (mixing up the bundle parameters for a post, getString, getByteArray). Api documentation could be improved.","created_time":"2011-01-06T05:26:04+0000"},{"id":"504063796_485195138796_3608020","from":{"name":"Renate Hermanns","id":"628810487"},"message":"Wow
, how fast time passes by. Your daughter is nearly grown up ;-).","created_time":"2011-01-06T09:00:23+0000"}],"count":2},"attribution":"Torres"}
I've already posted the question to the FB dev forum, awaiting response.
Related threads:
http://forum.developers.facebook.net/viewtopic.php?id=81365
http://forum.developers.facebook.net/viewtopic.php?id=75984
Facebook Graph API "/userid/feed" returning Blank
Your approach is correct, I've seen the JSON and yes it's missing the second one, I think it's upload app form adroid, try checking the application settings for this app. Or If your trying to retrieve the wall FQL is a much better way
SELECT post_id, actor_id, target_id, message FROM stream WHERE source_id in (SELECT target_id FROM connection WHERE source_id=<uid> AND is_following=1) AND is_hidden = 0
I've been through this, the way Facebook is categorizing their permissions is somehow misleading, for example Publicly available may sounds like Available to everyone on Facebook but apperantly it's not.
Now in your case, if you already authenticated the user, then try using:
/me/feed
I guess this is the only case where access_token is not needed in the URL.
I had a similar problem. But for me, the problem was related to not setting the scope properly on first login (to authorize the app). I posted a similar question and got an answer that worked for me here:
Facebook API how to get all wall items