0

I'm getting the following error when I try to post to one of my Facebook pages from Campaigns:

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: services/service.isgd.php

Line Number: 53

{"success":true,"errorMsg":"","errors":> [{"box_id":2,"campaign_order":1,"error":"shortenUrl(): "},> {"box_id":2,"campaign_order":1,"error":"shortenUrl(): "}],"campaignId":""}

Does anyone know of a way to resolve this? I am running EE 2.11.2, and Campaigns 2.2.0

1

This is due to Facebook API changes. The patch supplied by Vector Media for this is as follows

system/expressionengine/third_party/campaigns/services/service.facebook.php, line 90. Replace:

$html .= '<a href="'.$res->link.'" target="_blank">View Profile</a>';

With this:

$html .= '<a href="'.@$res->link.'" target="_blank">View Profile</a>';

And system/expressionengine/third_party/campaigns/views/status/facebook.php, lines 19 and 20. Replace:

        <strong>From Account: </strong> <a href="https://www.facebook.com/<?=$fbData->from->id?>" target="_blank"><?=$fbData->from->name?></a><br>
        <strong>Link: </strong> <a href="https://www.facebook.com/<?=$fbData->id?>" target="_blank">https://www.facebook.com/<?=$fbData->id?></a><br>

With this:

        <strong>From Account: </strong> <a href="https://www.facebook.com/<?=@$fbData->from->id?>" target="_blank"><?=@$fbData->from->name?></a><br>
        <strong>Link: </strong> <a href="https://www.facebook.com/<?=@$fbData->id?>" target="_blank">https://www.facebook.com/<?=@$fbData->id?></a><br>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.