Can I publish actions on objects not owned by me - facebook-opengraph

I am creating a movie timeline app with custom actions "Watching" but I want to use objects from imdb.com website.
Is this scenario supported? Do these objects must reside under my website?

That's possible.
Add the built-in watch action and movie object to your app and post to /me/video.watches with movie=http://www.imdb.com/title/tt0499549/ (example URL)
But at the end Facebook needs to check/approve your concept...

Yes this is possible as long as the action you're posting can be attached to the object type specified at the third party URL.
However, im not sure why you'd want to do this. Publishing an action to IMDB (for example) means friends of the user who published the story will end up on IMDB, not your app. But its your call...

Related

alfresco share site dashboard dashlets

I have created a site dashboard which has 3 dashlets. The data required by 3 dashlets and displaying in different views.
Currently I am using rest api call using "connector.get" inside webscript1.get.js,webscript2.get.js and webscript3.get.js files. Repeatedly calling in all three dashlets.
My question is, can I call it once and share the object with all three dashlets? I tried doing this with surf root objects, but those objects are immutable. Please can any one help?
In this case what you can do is, save the response of your ajax call in one global javascript variable.When first time you are calling an api, it will call the api and then set the response of it to a global javascript variable.
In other dashlets you can check whether this variable is null or not, If not null you can use the data.

Compare Meteor.subcribe() Vs this.subscribe() [Meteor + Blaze]

I have two pages/Template,
Dashboard (contains some User specific data as well).
Users.
I am using Meteor 1.5 with Blaze Template. Landing Page is Dashboard. I am using the common subscription for Collection Users in both Templates.
Scenario 1
When I use Meteor.subscribe('Users') in Dashboard's template.onCreated() and go to Users page, I see some already subscribed data coming back from Dashboard's subscription.
CODE:
Template.DashBoard.onCreated(function(){
Meteor.subscribe('Users');
});
Template.Users.onCreated(function(){
Meteor.subscribe('Users');
});
Scenario 2
When I use this.subscribe('Users') in Dashboard's template.onCreated() and go to Users page, I get a Fresh Subscription happening here and no data carry over from Dashboard's subscription.
CODE:
Template.DashBoard.onCreated(function(){
this.subscribe('Users');
});
Template.Users.onCreated(function(){
this.subscribe('Users');
});
Question
What is the difference between Meteor.subscribe('Users') and this.subscribe('Users') ? What can be the impact of using this.subscribe('Users') ?
As explained in Meteor documentation, this.subscribe within Template code will be automatically unsubscribed when the template instance is destroyed.
Whereas Meteor.subscribe needs to be explicitly unsubscribed if you want it to.
The decision to use one or the other depends on your app structure. If you are sure the data is relevant only for a given template, then use template scoped subscription, i.e. this.subscribe.
If the data is used across several pages, either use the "global" form, or scoped at a higher template level (one that persists through your pages, e.g. on layout).

How do I add a collection of builtin book actions to my app's section?

My app publishes the builtin actions:
og.likes
books.reads
books.wants_to_read
I can create a collection for my app's section that includes the builtin og.likes (Called recently liked) but I can't figure out how to add the other collections to my section. (books.reads, books.wants_to_read)
When I goto https://developers.facebook.com/apps/APP_ID/opengraph/collections and click "Create a New Collection" the Action Type dropdown only includes Like. Read and Want to Read are missing. All these actions have been approved for my app.
What am I missing here?
How do I add these collections to my app's section?
Thanks,
Blair
you've to create the action for your app (read and wants_to_read), they are default actions
you've to create the message and add the action to the message
you've to add the message to your collection
It's kinda confusing, that on facebook 'actions' are the 3rd option under collection and message. But I guess you figured out already :)

Use built-in "Follow" action with a custom object type

How can I achieve such a thing? I have a custom object type - for example, a Club. I want users of my app to be able to Follow a Club, which has a manager that posts general club updates, etc. The two approaches I can come up with are:
A - Change my custom Club object type to use the built-in Profile object type.
B - Choose a synonym for Follow and try to get a custom action through the review process.
I already tried submitting as a custom Subscribe action and was rejected. Option A seems like I would be using the system against the way that it was designed to be used.
Clarification
I don't care about the user receiving facebook notifications or "following" the club in the facebook sense of the word. I just want to publish something to the user's timeline such as "Sammy followed a club on MyApp."
Facebook allows you to have a custom "Follow" action, but they don't make it obvious... for obvious reasons.
Create a custom action with a name other than follow
On the next page, change the name to follow
This is not sneaky in any way. After being rejected several times for synonymous actions like "track" and "subscribe" to try to work around the implied no-custom-follows limitation, it was finally suggested to me by the reviewer that I use the word "follow" for my custom action.

ASP.NET options/command generator framework?

I want to put context-sensitive, dynamic command options on my asp.net pages.
I tried coding my own command structure but it's not very good, and I'm sure there must be a framework for doing this somewhere I can re-use?
Example:
I have a detailsview for some database object, I want to code in the object class what commands are available, based on the state of the object. I then want a UI object I can place on the webform that will pass commands back to the object when user clicks them, or jump to a different link (e.g. when additional parameters are available).
e.g. form might look like this
Product Details
Name: XXXX product
Price: $1.00
Qty: 1
Commands:
> Edit
> New Stock
> Mark as obsolete
So the commands at the bottom would have very little UI code and pass actions back to the object. For example the New Stock command would jump to a new page to ask for a quantity.
I don't know of the framework, but you could create something yourself. Let's say you are using MVP pattern, and assuming that this is a CRUD application, you could tell each view what type of object it is related to, then annotate you object with operations that are available. Then Presenter could call Service to perform the operation. You could name your methods using some convention so that you can wire it up in a Service. It is a lot of work, and unless you have 100s of views it is not worth while. I am building app that is about that size, and I am in process of creating GenericMVP framework, that would make wiring a breeze.

Resources