Select friends that aren't fan of a page [closed] - facebook-graph-api

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm working on a Facebook application and I need to select all my friends that are not fan of a specific page: any idea on how can I build the query?
UPDATE
I apologise, I'll try to be much more clear.
In my application I want to select all the friend that are not fan of a page, because I want to invite them to I Like the page.
Looking into the developer guide I read that is not possible to execute the SQL NOT IN, so using the FQL how is it possible to retrieve those friends who Not Like the page?

run this FQL query:
SELECT uid,name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me()) AND uid IN (SELECT uid FROM page_fan WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me()) AND page_id='YOUR_PAGE_ID')=''
Edit:
You must has user_likes and friends_likes permissions in order to get this data

Related

Editable textbox on click, angular.js [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
in my project I have a list of project names and I'd like to edit the names with dynamic textboxes using angular.js. I'd like the textboxes of my projects names to become editable if I click on a button next to my project titles, and confirm the edition with another button when I'm done typing. Can I do such thing with angular.js ? I just finished the tutorial and am quite noob with it.
Actualy it is one of my most favorite example when I am doing AngularJS presentations to public :)
There is a code without single line of JS code:
http://plnkr.co/edit/ZwYA6R2e6kdhHBJAYf3V?p=preview
<span ng-hide="editing">
{{name}} <button ng-click="editing = true">Edit</button>
</span>
<span ng-show="editing">
<input type="text" ng-model="name">
<button ng-click="editing = false">Save</button>
</span>

Creating Toolbox objects (e.g. Labels etc.) in code [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I'm new at using Microsoft Visual Studio, but I have some knowledge about C++ language. I'd like to create object can be found in Toolbox, such as Labels, Button, etc., but without putting them onto the window by hand.
How can I do it?
Objects/Controls like labels and buttons are simply a special type of window, with associated window class and window procedure. As such, you call CreateWindowEx and supply for the second parameter, lpClassName, the class name of object/control you want to create (eg. for a label use the class name STATIC).
Check out the following tutorial for a complete example, using the BUTTON class
To create a button:
HWND hWndButton=CreateWindowEx(NULL,
"BUTTON",
"OK",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
50,
220,
100,
24,
hWnd,
(HMENU)IDC_MAIN_BUTTON,
GetModuleHandle(NULL),
NULL);`

Sliding Image on Sitecore [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Quite new to Sitecore. I need to develop a sliding image as shown on sitecore website below:
http://www.sitecore.net/
I'm cool with front-end Javascript. Could someone please help me design a template, items, components that's required to build on Sitecore? User should be able to change the images and text descriptions for the sliding content.
Thanks.
Create a new TemplateItem called e.g. SlideshowImageTemplateItem.
It should have a set of Fields that are necessary: Image, Description, Link, etc.
Now each of the images in the slideshow should be a separate Item in Sitecore tree created using the SlideshowImageTemplateItem.
Then create sublayout Slideshow and add a MultiList field to its rendering parameters which will allow you to select which slides should be displayed in the particular slideshow.
Did you take a look at the Nicam or JetStream demo sites available from Sitecore Partner Network (assuming you/your company have access)? Both have good examples of slider controls with editable text, all the Sitecore items and the related code to go with it. They also have the code changes required for a slightly different action in Page Editor mode, since you do not want the rotating action when you are editing.

Profile Image of user commented on facebook post [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
How can i retrieve the facebook post with the commnts and the profile pictures of the user through the single graph api call?
No need to fetch the image if you have the user_id of the commentor.
The URL to get the profile picture is
http://graph.facebook.com/{user_id}/picture
Infact, you can get three types of profile picture by using the graph API. That is,
http://graph.facebook.com/{user_id}/picture?type=small
http://graph.facebook.com/{user_id}/picture?type=square
http://graph.facebook.com/{user_id}/picture?type=large
P.S: I guess the types are self explanatory.
You must use batch requests in order to do that, the first request gets the comment and the seconds uses its results to get the pictures.
You should provide the batch parameter with the request as following:
batch=[
{
"method":"GET",
"name":"get-comments","relative_url":"<SOME POST ID>/comments",
},
{
"method":"GET",
"relative_url":"?ids={result=get-comments:$.data.*.from.id}&fields=picture"
}
]

Random Trailer app in Django [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm very new to Django and am trying to build my first good app. I've decided to try to rebuild a website of low complexity, and chose: http://trailertrack.me/
I was wondering if you could tell me which steps to take.
Right now, my views.py file looks like this (I'm only trying to show one specific video at the moment):
from django.http import HttpResponse
from django.shortcuts import render_to_response
import gdata.youtube
import gdata.youtube.service
yt_service = gdata.youtube.service.YouTubeService()
yt_service.ssl = True
def index(request):
message = "Welcome, and enjoy the show!"
context = {
'message': message,
}
return render_to_response('index.html', context)
def video(request):
t = loader.get_template('index.html')
specificentry = yt_service.GetYouTubeVideoEntry(video_id='1g4PLj0PlOM')
return HttpResponse(t.render(specificentry))
Thanks for your advice!
Okay, here's a broad outline of how I'd go about doing this. The order doesn't matter too much; there's obviously some dependencies among them, but do them in the order that you feel like tackling them.
Also, if you're new to this, I'd strongly recommend using either git or, if you're already familiar with it, mercurial for version control, and virtualenv for tracking dependencies.
Get your current views working, so that you can see that one specific video with a reasonable-looking template and so on.
Add a way to show more than that one video. One straightforward way to do this is to create a simple Django model for videos, with basically just a youtube ID, and turn on the admin site so you can add videos manually.
Make the view show a random video on each load.
Add a "next" button that just reloads the page. You can either use a django session variable / GET variable to avoid showing the same video again, or just assume it won't happen often enough to be a problem if you have a lot of videos.
Add a way to get new videos from Youtube (semi-)automatically. One way to do this:
Add an "is published" field to your video model, and have the user-facing site only show published videos.
Make a management command that does a Youtube search for "trailer" or something and adds new videos (unpublished) to the database. (Check for duplicate IDs at the very least.) Run that automatically in cron every few hours or days or whatever.
Go into the admin periodically and add new videos. If you want, you can make a custom admin view that shows a bunch of pending videos on a page, with their metadata, the actual video so you can watch it, and any other videos that might be duplicates in the system, along with AJAX publish and delete buttons. (The duplicates thing is a little harder! You can probably just do tf-idf weighting on the metadata to find similar videos.
Add a way for users to log in (the default Django users system, Facebook/Twitter integration, whatever) and like/upvote/maybe downvote videos. Remember these. Add video recommendations with some form of collaborative filtering.
You now have more features than the original site! Think of some other cool ones and implement them too. :)