I have a very simple RSS integration campaign set up for a tumblr blog to mailchimp. The idea is that there is a daily post on the tumblr blog that gets emailed out to a list by mailchimp. That email is set to go out at 12:00.
Sometimes, if a different campaign was used for some reason or there were other issues, mailchimp will try to send the campaign with the last 2 posts - one of which might have already been sent out.
How can I get mailchimp to send only the most recent post?
You can use a FeedBlock and limit the items to only the first one.
*|FEEDBLOCK:https://www.url.com/test.xml|* *|FEEDITEMS:[$count=1]|*
*|FEEDITEM:TITLE|*
*|FEEDITEM:CONTENT|*
*|END:FEEDITEMS|* *|END:FEEDBLOCK|*
Use RSSITEM family tags:
https://mailchimp.com/es/help/rss-merge-tags/
It will load the information of the last post.
Related
How can one get multiple attachments of a post/status in a group?
For example: A group status that some member wrote and added multiple photos to..
Currently I am using Graph api to get the group stream with group_id/feed and unable to see images attached to a single status - while accessing the feed from Facebook itself I can validate that there are few photos attached to the status.
Using FQL it is possible to get the attachments with the following query:
SELECT attachment FROM stream WHERE post_id = each_post_id
Considering I will have to send this request per post and that FQL will soon be gone I am searching for an alternative.
I was looking for a solution for this as well and actually just found it.
The Facebook Platform changelog says the following:
/v2.1/{post-id} will now return all photos attached to the post: In
previous versions of the API only the first photo was returned with a
post. This removes the need to use FQL to get all a post's photos.
With this knowledge I went to the Graph Api Explorer and found a post that had 2 attachments or more added to it.
After finding the post, and with that the post id, I tried the request Facebook told me to do:
/v2.1/{post_id}
This does NOT give you the desired result. The nice thing about the explorer is that you can search for fields you want to add to your request.
You want to add the attachments (plural) field. NOTE: It might be that the graph api explorer only shows the attachment (singular) field. This is NOT right.
So, to summarize:
Get the post id of the post containing the images.
Create a new request to the graph api that looks something like: /v2.1/{post_id}?fields=attachments
Then read the result to get your desired attachments.
I hope this helps you out as I have been struggling for a while as well.
KR
PS: This is tested with a user and not a group, but it should be basically the same.
PS2: This is just an explanation of how you get attachments of a single post. You can also add the attachments field to the /me/home egde to immediately get all attachments at every post like so:
me/home?fields=message,from,attachments
PS3: The permissions you need are
user_status
read_stream
user_photos
user_videos
Facebook is not very clear on this matter and it is very hard to figure things out like this. So I hope this will help everyone that is searching for this solution.
I answered for the same question here : /v2.1/{post-id} does not deliver photos
It seems it's a Facebook bug. My colleague opened an issue. Here's the link: https://developers.facebook.com/bugs/762280800482269/
You also can find some info here:
https://developers.facebook.com/bugs/790976317600139/
Hope it will help you.
Given a Facebook user id and a Facebook page id, is there any way to get find all interaction that user has done on the page (posting comments, liking posts etc) without first downloading the entire feed?
I have access key for the page and if necessary I can get one for the user.
For example on the page 315390295169855 (Ninja Saga page) user ID 100002190613755 has written a comment on the post 315390295169855_401357983239752. I would like to search that page so that such interactions could be found.
Things I have tried
I tried
https://graph.facebook.com/315390295169855/feed?q=100002190613755&access_token=FOO
But that doesn't seem to do the trick.
I have also considered first downloading the entire feed and then searching through it. However it turns out to be impractical, as for example the Ninja Saga page has tens of thousands of interactions and would likely cause the user to start playing farmville instead of waiting for the megabytes-long pre-search download to complete.
You have the answer there - pull the list of comments from the Posts you retrieve on the /feed connection of the page - i think the default return from a call to /feed includes a small number of the recent comments on each Post too, and you can retrieve the rest with a call to /POST_ID/comments
I need to retrive the comments for the particular post on Facebook, so whenever i post sometext on facebook using graph api as mentioned below.
$result = $facebook->api($fid.'/feed/','post',$attachment);
It returns the post id in response($result).
When i login to facebook and hover on the "datetime" for that post, it shows me the different post id and not the returned one in my response, so i couldn't get the comments for that post id.
I use to get the comments using the code below.
$post_comments = $facebook->api('/'.$postid,array('access_token' =>'AAAAxxxxxx'));
Any Help would be Appreciated!
Thanks,
The Post ID returned by the API is in the form {user_id}_{post_id} so its slightly different than the one facebook shows. However, if you replace the _ with /posts/ you get the same URL as the one Facebook provides.
I ran into this behaviour myself some days ago – user used three different apps and thereby created three individual link-posts. The "x minutes ago"-link for each of them showed a different number of minutes, but clicking on any of them led to the same post, the first on that was made.
I suspect it has something to do with all three post being made from page tabs on the same fan page(?) – but i looks like a bug to me, because to any of his friends following the "x minutes ago"-link on one of the other two posts it surely must be a bit confusing to be taken to a different post detail page than the one the actually clicked on.
I'm stuck on these three things. Firstly, I'd like to limit invitation count depending on users action i.e. max invitations to 3 friends. Not all, not 30, just 3. I set max attribute, but it doesn't work. I'm using FBML: .
My second problem is that I can't get IDS of users, which has been invited by currently user. I'd like to save to database those invited IDs to use for later.
And most strange, third problem, is it possible to disable already invited users within multi-friend-selector dialog, that they can't be invited many times?
I found solution for 3rd problem: exclude_ids.
I also found solution (damn mistake) with first - limit (max="3" attribute on multi-friend-selector) problem.
At least how can I get submitted/posted/selected IDs of invited users?
Using the JS SDK you can use the max_recipients. I don't know why they do not have documented that.
Here is a sample
FB.ui(
{
method: 'apprequests',
message: 'My Great Request',
max_recipients:1
}
,
requestCallback
)
Worked on that few months ago, trying to remember...:D
Using the JS SDK, you can set a callback function to the invitation dialog.
https://developers.facebook.com/docs/reference/dialogs/requests/
In this callback, Facebook gives you the ID of the invitation requests that have been sent : You have to parse it to get the informations you need (ID of invited people, in your case).
I'm not using only FBML tags, but it seems that using your fb:multi-friend-selector in a fb:request-form allow you to retrieve the IDs of invited people when posting the form.
http://developers.facebook.com/docs/reference/fbml/request-form/
About your filtering problem, in the JS SDK, again with the FB.ui function, there's a parameter filters allowing you, for example, to allow your user to invite only non-users, or only "already" users. Is it what you need ?
I don't know if you have the choice to use FBML or not, hope this could help a little at least.
I would like to include inline links friends within the message of a stream.publish call. Here is example pyFacebook code:
Code:
facebook.request_extended_permission("publish_stream")
facebook.stream.publish("#John Doe is cool")
Is there a way to include markup in the message to do this?
src: http://forum.developers.facebook.net/viewtopic.php?pid=339920
Facebook had included a way to do this notifications, about 2 years ago but unfortunately, the functionality hasn't made it's way into the stream publishing methods. So, for right now, it's not possible to tag a user's friends in a post that you are composing via your application. ::sad trombone:: heh