Currently I'm developing a custom facebook app.
Simply it will list products from companies.
For each product (10 per page) I want to not-only show the count of the companies FB page but also like to show some faces with it (ppl who like the page). My idea looks alot like the FB like box plugin though I'm unable to customize its design.
One option I came up was to fetch all friends likes (1 x per day) and only show those faces, though this could become pretty server heavy due to that there will be a couple hundred companies. Which will eventually make an easy 1000 users = 1000 * 500 queries per day.
Somehow I can't find any other way to like "scrape" like-box (just need 5 to 10 faces per listing).
Related
I'm working on an Ad-tech system which serves millions of users.
Basically users (non anonymous users) can see different Ads that are being created by the marketing team.
Our marketing team want to be able to set some Frequency caps on those Ads (among other targeting rules they already have)
For example:
"We should not show this ad for a user if he already seen/click this ad more than X times in the last Y days"
Also ads can be grouped to campaigns, so rules like that are also possibile:
"We should not show this for a user if he viewed more than X times ads in this campaign in the last Y days".
Also our marketing might wanna know how many people viewed/click a specific add in the last Y days.
We have roughly 200K RPM and our responses should be very fast.
The smallest unit of time for our queries is one day and it will not change.
Few questions and thoughts:
Is DynamoDB a good fit?
I thought about creating a table for each event type (Click/View/Close..)
What is the best way to configure the primary key?
I thought about settings the primary key as the user id and the sort key as a combination of the ad id and the current day {dd/mm/yyyy}
I thought about use "ADD" operation to increase the counter when a user click/view/.. an Ad in a specific date. are they expensive operations? do I have an alternative?
What is the best way I can use to also be able to query per ad and campaigns as well (for example: "all users views for all ads in campaign" or "get all ad views in the last 40 days) ) ?
What other considerations should I take in mind?
Thanks a lot
From what I read in the documentation, bundling allows you to display a sublist of cards once the user clicks on the cover. Does pagination just display a series of related cards at the top level ("root") timeline? If so, are there any good use cases for pagination? I would assume almost all users would prefer that there is a cover for a specific app that they can drill down into rather than have an application litter all of its cards on the root timeline.
Pagination automatically breaks up long content into multiple cards, but only the first card is displayed at the top level of the timeline. If an item needs to be paginated, a "Read more" menu item will be automatically inserted so that the user can read the rest of the pages. You would use this feature when you have free-flowing content like an e-mail message or a news story that you're inserting into the user's timeline. Note that pagination is automatic -- you only insert one timeline item.
Bundling is when you insert multiple timeline items with the same bundle ID, which causes them to appear as a single item at the top level of the timeline, and tapping it lets the user drill down into the remaining items in the bundle. This is useful, for example, if you need to insert several related but independent items at once without cluttering the user's timeline, like sports scores for several games in the same day.
I want to get the most recent updates from my liked Facebook pages (graph.facebook.com/me/likes/). I thought I'd got it working using FQL with the below statement
SELECT source_id, share_count,likes, FROM stream WHERE source_id in (select target_id from connection where source_id=me() and target_type='page') LIMIT 100
However it seems that FB is filtering out a bunch of pages due to their various algorithms. Is there any straight forward way of getting around this? I'd just like to see all messages and decide whats relevant myself.
I was previously jumping onto every single page of my likes via the graph api, but obviously this gets a bit crazy if there are 700 odd likes in my profile.
I have an application where I want to show items that your friends have shared. This is basically a subset of data that would appear on your Facebook News Feed, so I am grabbing /me/home and then filtering out some things that I don't need.
The problem is that /me/home is extremely slow. I'm seeing a range of response times that is between 1200 and 10000 milliseconds with an average probably around 4 seconds.
Even with cached connections and a HTTP library that does SSL correctly these request times do not change much.
Does anyone know a better way to grab the News Feed? When I open Facebook in my browser, the News Feed appears pretty much immediately. So I am wondering if there is some Graph API call that is optimized for this data or has this result cached already.
Is there maybe an FQL alternative for this?
You can do this in FQL. This query should get you started:
SELECT post_id, actor_id, target_id, message, attachment FROM stream WHERE filter_key = 'others'
In the Graph API explorer on my feed, I get ~1000ms response times for the FQL query vs. ~2500ms for me/home.
For Facebook's home page, keep in mind that they use a series of AJAX queries to fill each of the boxes on your page a little at a time. I was on a very slow connection in a hotel last week and watched these fill box by box. The news feed fills first, five posts at a time, followed by the other boxes on the page. If page load performance could be an issue, you may want to move to an asynchronous model.
FQL will definitely help with that, as you'll be able to filter the data before it is returned by FB more finely than you can with just the Graph API.
I develop WP7 app and I'm calling last 20 results from webservice and I wonder how to call next 20 when user goes to the end of listbox?
I have found some topics how to recognize when user reaches end of the list but I'm struggling how to re-call WebService and ask for next entries.
EDIT:
So okay, here is the thing. In my API I have two options:
- take some amount of results (like 10, 20, 30) and then show them all on the list
- second options is to ask API to give me like 3 pages of 20 records on each page
Thinking about second option: okay I can display just 1/3 pages and then when user goes down call another page (already stored on phone) but that makes no sense as user will download all records (even he don't want to see more than top 5...
The only idea is to call next results, but don't know how to re-call webservice on some point
Your problem seems more of a web-services related than a windows phone related. Because if you are getting some data from a web service then the web service provider should ideally provide you with some documentation on how to fetch next/previous records or entries.
Here are two links from Twitter API which gives you some idea on fetching the data in pages.
Getting the home_timeline data
Working with Timelines
Here is another link which gives idea on how to implement paging in a Silverlight Application (I am not sure how far this method is compatible with WP app)
If this data couldn't answer your question, then update your question with some additional data like which url you are using to fetch the first 20 records etc