#StackBounty: #magento-1.9 #shopping-cart #facebook Adding AddToCart link to facebook shopping page

Bounty: 50

I have a Magento v1.9.2.3 webshop and I’m also adding my products to my Facebook shopping page.

I thought I could use the form action url from my webshop as the payment url in FB shopping: https://www.scrapwebshop.nl/checkout/cart/add/uenc/aHR0cHM6Ly93d3cuc2NyYXB3ZWJzaG9wLm5sL3N0ZXJyZW5iZWVsZC1rbmlwdmVsbGVuLmh0bWw_X19fU0lEPVU,/product/5130/form_key/bO1glkQ2GyvpRd7m/

But after reading I (and trying) I understand the form_key is changed after every cache clear/refresh (which we do very regularly).
So I need a more flexible solution.

How can I solve this? I can’t imagine I’m the first to try this. Should I create a new php page that will do this or … ?

Thanks for any advice.


I created a new php page in the root of my webshop and added these lines:

 $product = Mage::getModel('catalog/product')->load(5130);
 echo Mage::helper('checkout/cart')->getAddUrl($product, array('qty'=>1, 'form_key'=>Mage::getSingleton('core/session')->getFormKey()));

The resulting url is https://www.scrapwebshop.nl/checkout/cart/add/uenc/aHR0cHM6Ly93d3cuc2NyYXB3ZWJzaG9wLm5sL0FkZFRvQ2FydC5waHA,/product/5130/form_key/lPCvzei32zLtxqxp/qty/1/ but according to the form url it should be https://www.scrapwebshop.nl/checkout/cart/add/uenc/aHR0cHM6Ly93d3cuc2NyYXB3ZWJzaG9wLm5sL3NhbGUvc3RlcnJlbmJlZWxkLWtuaXB2ZWxsZW4uaHRtbD9fX19TSUQ9VQ,,/product/5130/form_key/kqe8DtKacPrJzjgN/
Notice the difference of the form_key ?!?!?

The resulting URL is not working, but the form url is. So this is not a working solution.

Found something else and added these lines of code:

try {     
    $cart = Mage::getSingleton('checkout/cart');
    $product = Mage::getModel('catalog/product')->load(5130);

    $parameter = array('product' => '5130',
                'qty' => '1',
                'form_key' => Mage::getSingleton('core/session')->getFormKey()

    $request = new Varien_Object();
    $cart->addProduct($product, $request);
    echo 'product added<br>';
} catch (Exception $e) {

product added was printed but when I go to my cart it is still empty.
So this is not working either.

I would really much appreciate if someone would help me out.

Get this bounty!!!

#StackBounty: #facebook #laravel #laravel-socialite How do I manage a users facebook "managed pages"?

Bounty: 50

I am currently working on a project where we want to post to a users facebook wall or the wall of one of a users managed pages.

See this page: https://socialiteproviders.github.io/

Note that facebook is not listed! Weird being it is one of the top social networks, why is it left to be a custom, override provider?

    return Socialite::with('facebook')->scopes(['publish_actions', 'manage_pages', 'pages_show_list'])->redirect();

and then

    $user = Socialite::driver('facebook')->user();

Where can I find documentation on socialite in regards to facebook? Specifically how do you get the information on managed pages for the user who just logged in.

We do have app permission from facebook. When you link your account, on the facebook page it pops up asking to give permission to the app to manage pages.

When I dd() the results of ->user()

I get

token, refreshToken, expiresIn, id, nickname, name, email, avatar, user -> [name, email, gender, verified, link, id], avatar_original, profileUrl.

If I understand correctly, there should be a way to get a “data” attribute that contains information on managed pages.

see this link: https://developers.facebook.com/docs/pages/access-tokens#multiple-pages

Am I going to have to work directly with the Facebook API, or is there a way to get this information out of socialite?



I was asking additionally about a facebook provider, and whether it was hard coded into socialite. I have since posting this foind in vendor/laravel/socialite/SocialliteServiceProvider.php is actually wired up for facebook. I still however, cannot figure out how to manage a facebook users “managed pages”

Get this bounty!!!

#StackBounty: #facebook #notifications #facebook-notifications How to disable irrelevant Facebook notifications?

Bounty: 100

I get too many irrelevant Facebook notifications from friends of the activities which do not involve me at all. This include status updates, posting pictures, sometime comment replies and what not. I am not sure if I get these from all friends or a chosen few.

This is what my notifications look like

enter image description here

These are my notification settings

enter image description here

I tried contacting Facebook support so many times. Never received any response.

“Get Notifications” option is already unchecked for these friends. I even tried enabling “Get Notifications” and then disabled it just to make Facebook aware of it but it didn’t stop notifications.

It looks a like a way to keep me active but instead it has made me leave Facebook for a very long time. What settings should I do to disable these notifications?

Get this bounty!!!

#StackBounty: #facebook #facebook-pages #rss Getting event updates from a Facebook page to an external destination

Bounty: 50

I’d like to get updates about new events / events updates from some Facebook pages, but I don’t want to get those updates as Facebook notifications.

Is there a way to send those updates to an external destination? (RSS, Webhook, IFTTT, Zapier, simple message etc.).

I find Facebook notifications pretty annoying, and for things that I don’t want to miss I prefer to have another option.

Any idea would be appreciated!

Get this bounty!!!

#StackBounty: #php #facebook #facebook-graph-api #web-crawler Facebook crawler is hitting my server hard and ignoring directives. Acces…

Bounty: 500

The Facebook Crawler is hitting my servers multiple times every second and it seems to be ignoring both the Expires header and the og:ttl property.

In some cases, it is accessing the same og:image resource multiple times over the space of 1-5 minutes. In one example – the crawler accessed the same image 12 times over the course of 3 minutes using 12 different IP addresses.

I only had to log requests for 10 minutes before I caught the following example:

List of times and crawler IP addresses for one image:

2018-03-30 15:12:58 -
2018-03-30 15:13:13 -
2018-03-30 15:12:59 -
2018-03-30 15:12:18 -
2018-03-30 15:12:59 -
2018-03-30 15:12:15 -
2018-03-30 15:12:42 -
2018-03-30 15:13:01 -
2018-03-30 15:12:40 -
2018-03-30 15:13:10 -
2018-03-30 15:15:16 -
2018-03-30 15:14:50 -

What the og:image is according to Facebook’s documentation:

The URL of the image that appears when someone shares the content to
Facebook. See below for more info, and check out our best practices
guide to learn how to specify a high quality preview image.

The images that I use in the og:image have an Expires header set to +7 days in the future. Lately, I changed that to +1 year in the future. Neither setting seems to make any difference. The headers that the crawler seems to be ignoring:

Cache-Control: max-age=604800
Content-Length: 31048
Content-Type: image/jpeg
Date: Fri, 30 Mar 2018 15:56:47 GMT
Expires: Sat, 30 Mar 2019 15:56:47 GMT
Pragma: public
Server: nginx/1.4.6 (Ubuntu)
Transfer-Encoding: chunked
X-Powered-By: PHP/5.5.9-1ubuntu4.23

According to Facebook’s Object Properties documentation, the og:ttl property is:

Seconds until this page should be re-scraped. Use this to rate limit
the Facebook content crawlers. The minimum allowed value is 345600
seconds (4 days); if you set a lower value, the minimum will be used.
If you do not include this tag, the ttl will be computed from the
“Expires” header returned by your web server, otherwise it will
default to 7 days.

I have set this og:ttl property to 2419200, which is 28 days in the future.

I have been tempted to use something like this:

header("HTTP/1.1 304 Not Modified"); 

But my fear would be that Facebook’s Crawler would ignore the header and mark the image as broken – thereby removing the image preview from the shared story.

A video showing the rate at which these requests from the Crawler are coming in.

Is there a way to prevent the crawler from coming back to hit these resources so soon?

Example code showing what my open graph and meta properties look like:

<meta property="fb:app_id" content="MyAppId" />
<meta property="og:locale" content="en_GB" />
<meta property="og:type" content="website" />
<meta property="og:title" content="My title" />
<meta property="og:description" content="My description" />
<meta property="og:url" content="http://example.com/index.php?id=1234" />
<link rel="canonical" href="http://example.com/index.php?id=1234" />
<meta property="og:site_name" content="My Site Name" />
<meta property="og:image" content="http://fb.example.com/img/image.php?id=123790824792439jikfio09248384790283940829044" />
<meta property="og:image:width" content="940"/>
<meta property="og:image:height" content="491"/>
<meta property="og:ttl" content="2419200" />

Get this bounty!!!

#StackBounty: #backup #facebook #data-transfer #facebook-messenger #instant-messaging Transfer Facebook Messenger messages from one pho…

Bounty: 50

I am using Facebook Messenger without a Facebook account (only a mobile number), and would like to transfer my messages from one Android phone to another. What is the best way to do this?

I have tried using Helium Backup but it does not backup Facebook Messenger. Titanium Backup unfortunately is not an option as the phone cannot be rooted (rooting it would require a data reset, which would delete the messages).

Get this bounty!!!

#StackBounty: #facebook #privacy #facebook-privacy #instagram Prevent Instagram from suggesting me to my Facebook friends (accounts not…

Bounty: 50

In my Instagram app I don’t log in with Facebook (my accounts are not linked and have never been) but somehow Instagram is showing me contacts from Facebook and presumably showing my contacts my account.

  • Is this due to the email I signed up with Instagram?
  • Will I have to create a new email account to reclaim my privacy?
  • Any solution to prevent this unauthorized information leak from Facebook to Instagram?

I don’t want to make my account private, I just have a different audience for my art. Even on Private the app still crawls my Facebook and encourages me to “invite” from a creepy list of Facebook contacts.

Get this bounty!!!

#StackBounty: #facebook #privacy #contacts #whatsapp Does WhatsApp 'upload' contact list to Facebook's databases? If so, ho…

Bounty: 50

I’m trying to find out if installing WhatsApp will send the information of all my contacts to Facebook. The Usage of your phone number and address book FAQ page is not clear about that.

I can deny the app access to my contact list but that is counterproductive to using it. It’s fine if WhatsApp accesses my contact list but I want that information to stay ‘in my phone’.

Just as I do not allow Google or LinkedIn to collect my contact list, I also want to prevent my friends’ information ending up in the Facebook databases (through me). After all, my friends never gave permission for that.

This is what the FAQ says about Usage of your phone number and address book, but that still does not answer my question:

WhatsApp users do not have access to your address book information, unless you share a contact using the “Share Contact” feature in a chat. We value your privacy and we have not, do not, and will not ever sell your personal information to anyone. If you would like to learn more, please take a look at our Privacy Policy that helps explain our information practices.

WhatsApp uses the phone numbers from your phone’s address book to provide you an up-to-date list of WhatsApp users you know to make it easier for you to message them via WhatsApp. WhatsApp regularly looks at the phone numbers in your address book and then checks to see which of those numbers are verified in WhatsApp. During this entire process, phone numbers are sent to WhatsApp for lookup, securely, over an encrypted connection. So that you know who you are chatting with, the app then displays the names from your address book.

Maybe superfluous to say: I do not have Facebook/Messenger installed on my (Android) phone.

Get this bounty!!!