Facebook Marketing - Story Image - php

When creating a Facebook Campaign though UI (Business Manager) there's a way to set an alternative picture for a group, so for example you can set different dimensions picture to display in the stories. However when creating same campaign using API calls, looks like there's no way for doing so? I can only have one image for an Ad Creative.
Can someone point me towards a right direction? Code sample or just an explanation of what objects needs to be created in order to achieve the result?
Here's what I'm writing about when having it about image-groups whet using Facebook UI:

Related

Saving image with GD Handle

I am currently working on a website which will be used for displaying scores in several benchmarks. In order to accomplish this, i am using PHP(duh :D) for the database queries and the JPGraph library, which creates the graph and then displays and it as an image with the GD library.
The user of the site can select which chart he wants to see with a <form> that contains the following criteria:
The Client that ran the test
The Operating System the Client used at the time
The Benchmark that was used
And what type of chart he wants to see (Bar graph, line graph....)
All of this works fine, the graph is displayed without a problem in the <iframe> that it is supposed to be in.
However, I also want the user to be able to save the Graph, with, say a second button. I can get the GD handle of the image, but how can I use this to save the image to a file on the client?
Any help would be very welcome.
Regards, Andy

How to pull Instagram photos to my blog and integrate with Fancybox?

I saw the docs on the Instagram developers page. http://instagram.com/developer/endpoints/
But I want to display my own photos so I will need to get an access token. After that I want to make my photos work in a Lightbox or Fancybox. I was able to make this work with all endpoints that require a client ID. Its the access token that stumps me.
Edit:
I want to use php and or jquery to create a gallery of images from my account. Can anyone out there point me in the right direction? Are there any tutorials I can use that demonstrate this from start to finish?
I've just written a tutorial to help people like you manipulate this api and generate Fancybox gallery. It even includes source files of the final product. Here is a link http://www.blueprintinteractive.com/blog/how-instagram-api-fancybox-simplified

Facebook App user photos in result photo

I am not sure if this is the right tag to ask this question.
I have see many facebook apps which generate a customized image as output of the app wherein profile pics of users and their friends are superimposed or say combined to make one single image. After that tagging is done as well.
Can anybody tell me how is it done?
I am trying to make a similar app using php
Thanks in advance
I've used Imagick for a while - really easy. Its done by making calls to libraries such as the ones listed here and in #darlinton's answer. The libraries have functions like borderImage, cropImage, resizeImage, compositeImage.
take the photos as described here: How to use Facebook graph API to retrieve fan photos uploaded to wall of fan page?
then merge them like this: http://php.net/manual/en/function.imagecopymerge.php
or using some component/framework/library you like, e.g. GD http://php.net/manual/en/ref.image.php.

How to get Page Photo with the most likes & comments?

I'm using the Facebook PHP SDK to try and get the photo with the most number of likes for a Page, to be able to use as a "hero photo". The logic being that the photo with the most likes & comments is the most interesting to look at.
However, the only method I can think of is slow and cumbersome.
Is there a better method than using the below?
1. Query the Graph API for the albums belonging to a Page
2. Query the Graph API for Photos in each Album
3. Add the likes & comments for each photo
4. Re-order the list of photos and return the best few
As you can see it's a lot of work for a relatively low payoff, but I can't think of a better way to return the most popular photo of a given Page.
Any suggestions?
It seems this is the only way to retrieve this information.
I would recommend placing this series of queries in a cron job that runs periodically and updates a static file containing the results. Then you can just source that file and not have to run the queries for each user. If each user were to execute this batch of queries your application would be extremely slow or have a large load time...

Flickr API PHP getPhotoSets Description

I'm trying to integrate the Flickr API with Jquery Gallerific. If you're familiar with Gallerific you know photos in the Gallery can have a caption. I'm trying to pull photos from a specific set from a user using flickr.photosets.getPhotos to get thumbnails. However, with this method it's not possible to get description for each thumbnail, only for the set so I'm having to run flickr.photos.getInfo for each photo in the set, which works but is pretty much useless as a page takes 10+ seconds to load. Does anyone know how to obtain flickr photos from a set with the individual description for each photo? I've looked through the API but can't seem to find anything.
Thanks in advance!
Never actually used the Flickr API but what about just loading the thumbnails initially, then using JSONP (or a custom "proxy" of sorts) to query photo information asynchronously after the page has loaded. Or, better yet, when the user actually hovers over an image.

Categories