update creative in existing ad group - facebook

We are trying to update\replace the creative of existing adgroup with no success.
According to the documentation is supported:
Updating and deleting ad groups
*Using the ad group ID, you can update the following fields in an ad group:
name
max_bid
adgroup_status
bid_type
targeting
creative*
We pass a new creative id to the adgroup using the graph api , but nothing happens.
How can we update the creative of an existing adgroup?
Found a solution, you can replace the creative but you can't edit an existing creative.

You are only able to rename the creative and/or change the creative's run status. Other elements of the creative cannot be updated.
The AdCreative object is designed to help devs reuse the same creative across multiple adgroups. They have decided to lock it down so it cannot be edited after creation so that clients do not accidentally change the creative of 1,000s of ads without directly editing those ads. The concern is that people may forget which ads a creative is used in and they may end up editing the creative of an ad they don't intend to change.
In order to update let's say the creative's link_url, you need to post to graph.facebook.com/{adgroup-id} with a parameter creative and the value {link_url:"your_new_url}. New creative will be cloned from the old one, the new link url will be set, and the new creative ID will be assigned to the ad group.
At least this works at the moment :)

Related

How to tagging groups to yammer conversion

Can we tag (using #) more than one groups to a post so the every one in the group will get notification. Can we do that programatically?
What you are asking for is not currently possible, since it would require posting a message to multiple groups, which is not currently supported (source: I work at Yammer). If you think this feature would be valuable to you, I'd encourage you to support the respective suggestion on UserVoice (https://yammer.uservoice.com/forums/399627-yammer/suggestions/15625800-post-a-thread-to-multiple-groups) -- we look at UserVoice regularly as input for which new features we build for Yammer.
What you could do programmatically as a (somewhat ugly) workaround currently is to get all the users of the second group and CC them (or #mention them) on the message to the first group. You can get the users of the second group using the REST API endpoint /users/in_group/[:id].json -- see https://developer.yammer.com/docs/usersin_groupidjson
Yes, you can:
Post your message to one group (one you consider to be the main group)
Afterwards, click the "Share" link and select another group to which you want to cross-post the message
Dokumentation:
https://support.office.com/en-us/article/classic-yammer-share-conversations-and-files-in-yammer-2c69c57d-2605-4047-830c-089bb41b08bb?ui=en-US&rs=en-US&ad=US

Delete single product from Facebook Product Catalog

I'm working on adding Dynamic Product Ads to our app. I've created a Product Catalog through the Facebook Business Manager and successfully uploaded a CSV file of our entire product catalog. I'm also in the process of setting up a daily refresh of the products.
My question is - how do I make an immediate DELETE request for a specific product? If a user deletes a product I don't want to wait a whole day for the product feed to be refreshed and risk the user seeing an ad for a deleted product. The docs make it seem like that isn't supported... but I can't believe that's the case.
Relevant from the Facebook docs:
Update Invidividual Product
Product Item Reference (I think this is deprecated - DELETE request to /{product_item_id} did not succeed).
How about using the rules in Product Sets to exclude that product/s and then working with the Product Sets with the ads.
I got the product OFF facebook by editing the data source CSV, and under the availability column, I added discontinued. That removed it from Facebook after being imported from shopify.
Sorry for being late to the party.
I'm actually coping with this right now, and the only thing I can find in the API stating about individual products is actually when it comes to the Catalog Batch
To send item updates, use the /{catalog_id}/batch endpoint.
To create, update, or delete items in your catalog, make an HTTP POST
call to:
https://graph.facebook.com/<API_VERSION>/<CATALOG_ID>/batch?requests=

Facebook marketing API - how to Copy Ads / creatives

On facebook's documentation, in "What's New" they have a link titled "Copy and Reuse Ads with Ads Copy API." which leads to this.
Here, they have 3 links, all of them are currently broken.
My question is, how can I copy (and change) an ad, and more specifically, the ad's creative, which is immutable (therefore the need to copy instead of update)?
Update
At the time, we did get some information from our contact at Facebook. However, it meant this wasn't a good approach for us.
Also, there is now new documentation on copying ads, yet still it does not help us specifically, since it does not allow updating ad-creatives.
We've since abandoned this effort, and in fact, solve the problem by having Marketing personnel export the ads, update the field we needed by a script in an Excel file, then uploading back to Facebook.
The Ad Copy feature https://developers.facebook.com/docs/marketing-api/buying-api/ad-units#ad-copies includes 3 kinds of copies, on campaign, ad set, or ad level. There is not an ad creative copy function.
And there probably should not. Ad creatives are immutable, as you know. So why you want to copy another immutable one, instead of using the existing one?
I assume your questions is about how to get the specs of an existing ad creative, modify the specs somehow, and use the new spec to create a new ad creative.
Then, how to get the specs of an existing ad creative: use "effective_object_story_id", which will always give you an id no matter the ad creative was created using an existing post (thus an id was provided) or from scratch (thus an object_story_spec was provided). Once you get that id, in the format of _, you can just query that id directly, using /v2.9/. Then you can get all the specs. Modify it, and create a new ad creative using those specs.
Yes, this is more work than just copy an ad creative. But I believe you are not actually asking for a copy.
Good luck.

Checking if a user is a member of a specific facebook group (2016)

It appears there was a big update to the facebook api a year ago and a lot of the info online is inaccurate because of it. I'm trying to create a website that provides additional function for members of a specific facebook group; if a user is not part of a specific group I don't want them in it. Some groups may have more than 5k users but if I have to settle for less, so be it. I'm using the php sdk and have successfully made an initial api call with general user information.
Administrators of the group WILL be able to log in, but apparently Facebook isn't approving the "user_groups" permission (?) https://stackoverflow.com/questions/31171082/check-if-user-is-a-member-of-a-specific-group-using-facebooks-javascript-sdk
I found this but I'm not sure how to make it work. Facebook Graph - Possible To Check If A User Is A Member Of A Group w/o user_groups?
I'm using the graph api explorer and I can get a partial list of the groups I'm in but it's nowhere near complete (it displays 4 out of like 20). My thought was that if I can get a full list of members in a group that I could just do an [if user is in userlist then]
What would you do here?
As far as I understand there is no way to do this without some caveat where it won't work (when you have more then 5k members). It also causes you to create a copy of the members list, instead of when a user wants to access the group.

Restrict courses from displaying on Moodle conditionally based on user profile field?

I have an installation of Moodle 2.8.3 and I've added a custom user field, "role", to the user profiles. I can hide activities and documents based on that user field, however, if there is an entire course that is only for one role, the other roles see it.
Example:
I'm a client and I'm looking through the course catalog. I see a course "XYZ" and click on it to enroll but the course is totally empty because it's for employees only.
Are there any examples of this being done? I've done some research and found IOMAD but it's a completely custom deployment of Moodle and would need to go through a lengthy approval process and then be reinstalled on dev, imp, and prod.
Totara has audience visibility, so you can restrict courses to members of an audience.
http://help.totaralms.com/Audience_Based_Visibility.htm
Totara is a distribution of Moodle, aimed at enterprises.
http://www.totaralms.com/
I think the audience visibility code would be difficult to port to Moodle though. You can try out the Totara seedlings code from this link. https://github.com/totara/seedlings
Then once installed, switch on audience visibility using the help link above