Facebook marketing-api sandbox account - facebook

When I creating campaign, ad set and ad, I'm get this error:
All domains need to be associated with a pixel event pair and an ad. To publish this ad, either select a new domain for your ad or configure a pixel event pair for your domain in Events Manager.: {"error":{"message":"Invalid parameter","type":"OAuthException","code":100,"error_subcode":3260002,"is_transient":false,"error_user_title":"Domain Required","error_user_msg":"All domains need to be associated with a pixel event pair and an ad. To publish this ad, either select a new domain for your ad or configure a pixel event pair for your domain in Events Manager.","fbtrace_id":"AvW5I8dcvWIXI-Fe7IZuEsg"}}
The main problem is that we can't upload ads into sandbox ad account, because we using sandbox fb pixel and this pixel not exist in event manager.
What is possible solution for that?

I encountered the same issue on sandbox; my workaround on sandbox was to set
fbAd.Fields.conversion_domain = null;
and was able to create the ad.

Related

Retrieve Data via Facebook webhooks on individual level

We create campaigns in our application and attach customers that we are marketing to. The dealerships may choose snail mail, ringless voice-mail, email, or social media. If the dealership chooses to do a facebook ad campaign, we then create a campaign on business.facebook and upload a list of the customers that we want the add distributed to.
What I am wondering is if there is a way to receive data via the FB webhooks event when the customer views/clicks/likes/etc the ad, that will include the data on the individual level so that we can update the record in our local database that the customer has performed an action, and what that action was?
I have scoured their documentation and cannot seem to find this information.

Can I have a Adsense fallback on Google Ad Manager only if a variable is set or something?

On my site, I serve ads to both visitors/free members and paid accounts. The ads are served with Google Ad Manager.
In the case of visitors/free members, I would like to fall back on Adsense if there is no Ad Manager ad to display.
In the case of paid accounts, I would like to fall back to a house ad.
Is this possible somehow?
You can do this :
if user is loggued, add a key member=true to your GPT page level targetings.
then target your adsense line items to the inventory with key member=true only
To define page level key/values :
googletag.pubads().setTargeting('member', 'true');
Just keep in mind setTargeting only accepts strings or array values as detailed here (bolean or integer won't work)
Here is how to set your Adsense campaign up in Google Ad Manager.

Retrieving Azure AD Invitation Redemption URL after-the-fact

We have a Powershell script that creates some guest users using the New-AzureADMSInvitation cmdlet, and its return value has a handy-dandy InviteRedeemUrl property that we include in a nice welcome email to the user to get them started with setting their account up and using our application. This works fine when inviting individual or small numbers of users.
However, we'll need to do this for many users, and carefully control when the emails go out, and I can't see any other way of retrieving this URL after-the-fact... the only option seems to be the "Resend invitation" button on the guest user in AD, which sends a Microsoft-branded email from "Microsoft Invitations" with the redeem URL, which is kind of a problem... For marketing reasons we need to put the invite redeem URL in our own welcome email, so we don't want Microsoft sending out those emails.
Is there any way to retrieve or calculate that invitation URL after the guest user had already been invited? I know I could delete and recreate the invitation itself, but that's still a manual process and I'd like to be able to create guest users in bulk first, and then retrieve those URLs in bulk once we're ready to send out emails. Especially since Azure AD itself seems to be able to fetch the redeem URLs later on via the "Resend invitation" button.
Alternatively , you can think of adding you company branding in the verification and invitation mails in azure AD.
Here is something similar you can find:-
https://learn.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-faqs#how-do-i-customize-verification-emails-the-content-and-the-from-field-sent-by-azure-ad-b2c
Basically you need to change the company branding in Azure active directory to have your custom logo and text.
Hope it helps.
We ended up modifying the AD invitation script to store the InviteRedeemUrl value in our CRM as a field on the customer record. Then later on when our Marketing team wants to start their email campaigns, they could include a reference to this field in the email template just like they would any other field. This way, we got all our analytics on click/open rates and retained complete control over the emails, including where each batch was being sent from (so customers could reply to the correct support staff member for their segment).

Fetching comments from active facebook ads

I am working on a Facebook comment manager and I just can't manage to get only active ad creatives from Facebook API.
Is there a way to get all ad creatives filtered by their status?
I can't afford to check all ads manually, because I plan to pull ads every few minutes and I would be hitting Facebook's rate limit.
There are a number of endpoints that could help you do this, but would require you to make multiple API calls.
Step One: Get all Ads
Assuming you have managed to get the Ad Account ID from a previous API call, you will be able to get all Ads running against that account by making a GET request to the /act_{ad_account_id}/ads?fields=name endpoint.
Step Two: Get Images with Active Status
Next you can call the /{ad_id}/adcreatives?fields=name,image_hash,status endpoint for each Ad, which will return the name of the creative, the image hash that was used, and the status of the creative.
If you require the status of the actual Ad itself rather than the status of the creative, you will need to do another step in between Step One and Step Two, where you call /{ad_id}?fields=name,status on each Ad, then filter ACTIVE campaigns.
EDIT:
You can use /act_{ad_account_id}/adcreatives?fields=status,image_hash,title to get all creatives and statuses associated with the account. This would reduce your API call rate although would mean you would need to sort the creative to match with the ads. Using the title field would give the title of the ad it was used in the ad. Facebook does not offer any other fields related to the ad itself.
You can limit results to ads whose effective_status is ACTIVE.
Here is a sample request:
act_123/ads?filtering=[{"field":"effective_status","operator":"IN","value":["PAUSED"]}]
Ad fields
Insight Parameter

Unable to add ad account in the facebook business manager

I created a business manager and connected an application which access level is development.
Create one ad account.
When i try to create another, i receive the following message:
"You have reached the maximum number of advertising accounts
associated with this Business Manager's account. This limit helps to
prevent potential violations and fraud. If you need to add more
advertising accounts, contact your representative from Facebook or
click the gear icon and let us know about this issue. "
When i try to create an ad account through the api, api returns the following response:
{
"error": {
"message": "(# 275) Ad account can not be determined for this request",
"type": "OAuthException",
"code": 275
}
}
Can you explain why I can not create a new account, although the level of access for development, you can create 5 advertising account?
Is it possible to create ad accounts without business manager?
Advertising accounts must be linked to the real facebook user?
I will be grateful for explanations of how i can manage ad accounts on facebook
You can contact Facebook support or submit a request for more accounts, they generally give them very easily.
https://www.facebook.com/help/community/question/?id=10204144915803116