w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Is it possible to use Facebook insights without publishing actions
Insights can be retrieved only as an array. To read Insights you need a generic access_token for the publicly available application_active_users metric a generic app access_token for all Insights for that app read_insights permissions for all apps, pages and domains owned by this user https://developers.facebook.com/docs/reference/api/insights/

Categories : Facebook

Get Facebook's friend gender
Displaying a Friend object only displays his ID and name. You have to indicate that you want the gender! me/friends?fields=gender&access_token= If you still want the name: me/friends?fields=gender,name&access_token=

Categories : Java

How to set gender and age of a facebook test user
It is not possible with Test Users api yet but you can simply log in as any test user and change whatever information you need manually - like you do with your own Facebook account. Edit You can use such tools as PhantomJs or Selenium - just code a script to log on and change user's data. And call it when adding new test user.

Categories : Facebook

Empty story clicks statistics in Facebook application insights
How much time has passed since the stories have been first posted? Facebook Insights requires at least three days to update its data. Let's wait, and we'll see if this is a bug. I don't know about any special parameter to enable tracking: it should be available without any configuration.

Categories : PHP

Get insights from specific page
I think you can use user token instead of page token <?php require 'src/facebook.php'; $facebook = new Facebook(array( 'appId' => 'APP_ID_HERE', 'secret' => 'SECRET_HERE', )); $fbID = $facebook->getUser(); $pages = $facebook->api('/me/accounts'); $pageID = $pages['data'][0]['id']; $insights = $facebook->api('/'.$pageID.'/insights'); echo '<pre>'; print_r($insights); exit; ?> You can pass params since to get specific date range result.. Cheers.

Categories : PHP

about mod_pagespeed & insights configuration
Looking at your site, I don't see that mod_pagespeed is able to rewrite any resources (images, js, css, etc.). Can you check your apache error_log file to see if there are any relevant messages being generated by mod_pagespeed? If you don't see anything, try setting LogLevel info in your apache conf file and restarting. Often when mod_pagespeed is not able to rewrite a resource it is because it failed to fetch it. If this is indeed the issue, the best solution is to configure ModPagespeedLoadFromFile if your environment allows it. This allows mod_pagespeed to bypass serf, the HTTP fetcher it uses, and load files directly from disk.

Categories : Apache

Open Graph insights for specific post
You must add insights into a permissions/Extended permissions Article : Getting Page Insights In order to obtain Page Insights via the Graph API, you must use a Page access token, and you must have the read_insights permission. Click on the link below to see this working in the Graph API Explorer.

Categories : Facebook

WordPress tax_query based on gender
I suggest building a custom SQL query to pass to $wpdb, since complex taxonomy queries are notoriously harder to implement than their SQL equivalents. Note: You can always output the most recent SQL WordPress executed. This is a very nice way to debug these kind of problems. Back to your question, this is what the final code snippet would look like: $gender = 'unknown'; $taxonomy = array('male' => 'mens', 'female' => 'womens'); $where_clause = ''; if ( array_key_exists($gender, $taxonomy) ) { $where_clause = sprintf("WHERE %s = '%s'", "$wpdb->terms.slug", $taxonomy[$gender]); } $query = "SELECT $wpdb->posts.* FROM $wpdb->posts INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy

Categories : Wordpress

Classifying Twitter Text By Gender
I don't have any other text datasets that are for SURE written by males or females to aid in training the classifier. This is a hurdle for you then. Either you need to perform supervised learning with such a data set, for instance using a perceptron learner; or you need to perform unsupervised learning, for instance k-means clustering, and try to find clusters that you can (somewhat arbitrarily) declare to be male or female signals. Distinguishing gender in an unsupervised approach is going to be next to impossible in practice, at least without some other existing information, priors, or feature maps that you can build upon.

Categories : Twitter

How to retrieve gender of my friends with facepy?
You can get this using the Graph API flist=graph.get('me/friends?fields=gender') If you want only FQL, do this: graph.fql('SELECT gender FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())') I implemented this a few days back and you can check the source code here: https://github.com/astronomersiva/Facebook-analysers/blob/master/Gender%20analyser.py

Categories : Python

how to change the gender and name of the voice in pyttsx
if you are using windows then the pyttsx is using the default language that is being used for the Microsoft Speech application. HKEY_LOCAL_MACHINESOFTWAREMicrosoftSpeechVoicesTokensMS-Anna-1033-20-DSK, check the registry, if you have only one language over there then you don not have much of a choice, you can try to install some new sounds and then they the default example from the homepage of pyttsx.

Categories : Python

Print out different messages dependent on gender of patient
The problem is that you have defined p10 first at that time @gender din used to exist. so what you can do it either put that p10 declaration in both the if's after you have defined the gender. or just add diff lines in the arr in the if's only, like this. flag = false if patient.geschlecht == '2' && code.geschlecht == 'm' && code.geschlecht_fehler == 'm' @gender = 'männliche' flag = true end if patient.geschlecht == '1' && code.geschlecht == 'w' && code.geschlecht_fehler == 'k' @gender = 'weibliche' flag = true end @arr << "Bitte Kodierung überprüfen: Kode gilt überwiegend nur für #{@gender} Patienten." if flag In all you can not use the @gender before assigning it a value.

Categories : Ruby On Rails

Fill the missing/incorrect values for the gender
You can start with this, but what are the conditions with which you determine if it should be M or F? UPDATE yourTable SET gender = CASE WHEN -- your condition where you determine if it should be M -- THEN 'M' ELSE 'F' END WHERE LOWER(gender) NOT IN ('m', 'f')

Categories : Sql Server

Best technique to store gender in MySQL Database
Personally (because this is a somewhat subjective question) I'd go with ENUM. MySQL doesn't support CHECK constraints, so the ENUM is the only way to really make sure the value is M or F (or m or f). To me, that's the most important point. In addition, the ENUM should only need one byte of storage space (according to the docs), so it's just as efficient storage-wise as CHAR(1) or TINYINT. I don't understand the TINYINT approach at all because you end up with queries like this: SELECT * FROM myTable WHERE gender = 1; Is 1 male or female? And if it's male, is female 0? Or is it 2? Or maybe 16? You already have to remember a pile of things to write (and maintain) an application; no need to add to that pile.

Categories : Mysql

Getting birthday,gender and photo from google UserInfo
The link you're using as a reference is for after the user has been successfully authenticated. That means their user already has a code. If you are unsure of how to get one, you should probably first focus on getting the OAuth flow and wait to perform the API call after. There are a number of good resources for showing you how to perform the OAuth flow (getting a code, exchanging it for a token, persisting the token, etc) using the Google API Client Library. One of my favorites is the Quickstart tool, which will generate a starter application for you that has the OAuth code already implemented. You can try that out here: https://developers.google.com/quickstart/ (Note that it depends on Maven to handle the jars/dependencies) You can also check out some of the library's samples here:

Categories : Java

Using Weka to Classify Author Blog Gender
"Value not defined for given nominal attribute!" arrives when in instances that you construct, expected data happen to have other values than the ones that you defined in the arff @attribute section for a given nominal attribute. For instance, you defined expected values to be "M" or "F" , but the values that you read could be empty(N/A), etc. The solution is to rigurously verify your data, debug /trace what you load for that attribute on which the error occurs, and either add that value to the possible values for that attribute -- or, if this appears systematically in your case, define that attribute as having a more generic type (string, numeric,..).

Categories : Java

How to add filtering to find users by City, Gender, Photo and Age?
In rails, relations can be chained. def index @users = User.all if params[:min_age] && params[:max_age] @users = @users.where("profiles.birthday >= ? AND profiles.birthday <= ?", params[:max_age].to_i.years.ago + 1.day, params[:min_age].to_i.years.ago) end if params[:city] @users = @users.where("profiles.city = ?", params[:city]) end if params[:gender] @users = @users.where("profiles.gender = ?", params[:gender]) end ...... end Although , it is ugly.... If you persist to write filters, I suggest you encapsulte the logic to model and use scope. Or you can try a good gem named ransack. You will find it has done the most of works for you , you just need a little customization or not.

Categories : Ruby On Rails

Added ExpiresByType to .htaccess but PageSpeed Insights still states that I should "Leverage Browser Caching"
All of the listed resources seem to be external. You cannot add/modify headers and/or caching behavior in general for external resources, hence there is nothing you can to about that. Just make sure that all resources under your control (coming from your server(s) and or CDN) properly leverage caching.

Categories : Htaccess

Facebook App request not sending to Facebook friends through Facebook Android SDK
Direct the request Bundle params = new Bundle(); params.putString("message", "I just smashed " + application.getScore() + " friends! Can you beat it?"); // 2. Optionally provide a 'to' param to direct the request at a specific user params.putString("to", "515768651"); // Phil showDialogWithoutNotificationBar("apprequests", params); Suggest friends Bundle params = new Bundle(); params.putString("message", "I just smashed " + application.getScore() + " friends! Can you beat it?"); String [] suggestedFriends = { "695755709", "685145706", "569496010", "286400088", "627802916", }; params.putString("suggestions", TextUtils.join(",", suggestedFriends)); showDialogWithoutNotificationBar("apprequests", params); Ref : http://developers.facebook.com/docs/tutorials/a

Categories : Android

(Actionscript 3/Facebook SDK) "Facebook not defined" Facebook.init() not working
ReferenceError: Error #1065: Variable com.facebook.graph::Facebook is not defined. that means your program cannot see the reference class please check your Build Path SWC or ANE and build your project then retry

Categories : Facebook

Youtube Analytics API Demographic dimension "gender" shows on analytics dashboard but gives query invalid on API Explorer
The gender dimension can only be used with the metric viewerPercentage (and optionally with a country and/or video filter and with an additional ageGroup dimension, if you'd like). You can search the relevant documentation for "gender" to see the exact specifications. Here's an example of a working report in the API Explorer. Authenticate, and replace CHANNEL_ID with the id of your channel.

Categories : PHP

aggregation: sum columns by ID and average columns by id (gender and location unchanged)
You can get the result by using the aggregate functions sum() and avg(): select id, sum(cash) SumCash, sum(charge) sumCharge, sum(total) sumTotal, avg(proportion) avgProportion from yt group by id; See SQL Fiddle with Demo Edit, with the new columns that you added you can still get the result by using the aggregate functions. You will just need to include the gender and location columns in the GROUP BY clause: select id, sum(cash) SumCash, sum(charge) sumCharge, sum(total) sumTotal, avg(proportion) avgProportion, gender, location from yt group by id, gender, location; See SQL Fiddle with Demo

Categories : Sql Server

facebook notifications alert from facebook API/using facebook API
You can subscribe for Real Time Updates. The Graph API has a feature called 'Real Time Updates' that enables apps to subscribe to changes in certain pieces of data. When a change occurs, an HTTP 'POST' request will be sent to a callback URL belonging to that app. This makes apps more efficient, as they know exactly when a change has happened, and don't need to rely on continuous or even periodic Graph API requests when changes aren't happening. Note that real-time updates only indicate that a particular field has changed, they do not include the value of those fields. They should be used only to indicate when a new Graph API request to that field needs to be made. You can subscribe for changes in a single object or in an array of objects. See Receiving the Rea

Categories : Android

Facebook iOS SDK: scrumptious facebook not posting to Facebook
Found the answer here: IOS Facebook SDK - Post Open Graph and show on Timeline without clicking Activity Log Gotta specify fb:explicitly_share in the action object and explicitly set the privileges under Open Graph->action type in your Facebook App Open Graph settings.

Categories : IOS

Facebook like buttonto like a particular wall post (photo, video, link, etc) of my facebook page?
The middle response of Facebook Video Like Button Help? seems to indicate Facebook will automatically embed a like button into the video you upload to them (rather than linking to an external video). Also this article seems to confirm it: http://yourinternetbusinesslink.com/facebook-like-button-video/

Categories : Facebook

Facebook Redirect url to "https://www.facebook.com/dialog/oauth/read" with no access token
I might be mis-understanding your question/issue, apologies if so.. in your first line.. you have the redirect_uri set to just go back to facebook, whereas it's supposed to be the URI of the page on your site that you want facebook to send the user to after they authenticate and approve your app, no? in other words shouldnt your first line be: https://www.facebook.com/dialog/oauth?client_id=xxxxxxxxxxxxx&redirect_uri=**https://WWW.YOURDOMAIN.COM/YOURPAGE.ASPX**&display=popup&scope=publish_stream,user_status&response_type=token after the user clicks "okay" on the popup, it will then redirect them to YOURPAGE.ASPX on your site, passing the access_token

Categories : Vb.Net

PassportJs. How can I get facebook redirect uri without redirecting user after call passport.authenticate('facebook')
Passport is poorly documented on this issue - I struggled with it for a long time as well. I found you can call passport.authenticate(type, fn)(req, res, next), and within fn, you can distinguish between a user who can login and a user who can't. It's up to you to call req.logIn though. Just FYI, I'm assuming you're using sessions: module.exports.createSession = function(req, res, next) { passport.authenticate('local', function(err, user, info) { if (err) { res.json(500, {ok: false}); } else if(!user) { // you would probably want to do more work here // for example distinguishing between bad login credentials, // canceling, users not ready to log in (pending), etc. res.json(401, {ok: false}); } else { req.logIn(user, function(err) {

Categories : Angularjs

Facebook sdk for windows phone LoginAsync method throws an Facebook.WebExceptionWrapper exception
Check this question: Facebook Wrap Exception Wrapper This is the same bug already fixed in GitHub repo but not yet available via NuGet. The solution to your problem is to build Facebook.Client from source instead of downloading it with NuGet.

Categories : Windows Phone 8

Facebook Graph API & django-facebook - posting links and photos to page feeds
Facebook Graph API PHP SDK posting on page as page Found it. There is a different access token for impersonating the page to post as the page. You get that from /me/accounts and use that token to post as the page. Updated working code: @facebook_required_lazy(scope=['manage_pages', 'publish_stream', 'photo_upload']) def index(request): if request.method == 'POST': form = CPYPosterForm(request.POST) if form.is_valid(): fb = require_persistent_graph(request) msg = form.cleaned_data['msg'] pages = form.cleaned_data['pages'] me_accounts = fb.get('/me/accounts') access_token = None resp = dict() for p in pages: for d in me_accounts['data']: if d['id']

Categories : Django

callback issue in Facebook while user clicks anywhere while Facebook login page is loading
Goto onCreate() method of WebDialog.java in FacebookSDK library, you will find following statement: spinner = new ProgressDialog(getContext()); add the below statement after it spinner.setCanceledOnTouchOutside(false); you are ready to go!

Categories : Android

https://developers.facebook.com/apps takes me back to my Facebook Admin Panel
To get the Facebook API ID and Facebook App Secret, follow the following steps: Got developers.facebook.com/apps and login with your account user id and password. Click on Register as a developer button(green coloured) and follow and complete the verification process. After verification process, if u login again and go to developer.facebook.com/apps, you will get the +Create New App button clicking on which and following you would be able to get the App ID and secret. Let me know if you are having any problems with this.

Categories : Facebook

com.facebook.http.protocol.ApiException: remote_app_id does not match stored id with Facebook SDK 3.5
If other people are compiling your code, they're most likely using their own keystore, which would result in a different key hash. You can either use the same steps, and add their key hashes to your app settings, or you can distribute your debug keystore to the other users who will be compiling your app, or you can build your app as an apk using your keystore, and distribute the apk to the other users.

Categories : Android

Facebook giving invalid token Facebook exception on login after reinstall
Try this code for facebook login Session.openActiveSession(this, true, new Session.StatusCallback() { // callback when session changes state @Override public void call(final Session session, SessionState state, Exception exception) { if (session.isOpened()) { if(!session.getPermissions().contains("email")) { session.requestNewReadPermissions(new Session.NewPermissionsRequest(Facebookpersil.this, PERMISSIONS)); } // make request to the /me API Request.executeMeRequestAsync(session, new Request.GraphUserCallback() { // callback after Graph API response with user object @Override public void onCompleted(GraphUser user, Resp

Categories : Java

how to load facebook activity feed in website only when called or facebook is selected
User $.getScript() to dynamically load the script once facebook option is loaded. $.getScript(url) .done(function(){ parents.find('div.item').append('<div class="description disp hover"><div class="fb-activity fb_iframe_widget" data-header="true" data-height="300" data-width="300" data-action="like,comment,recommend,share,suggest" data-site="http://www.icimod.org/" data-app-id="118280394918580"></div></div>'); }); get to know about $.getScript().

Categories : Facebook

save email, country, ..., full name from facebook to database with login with facebook
You are trying to login the user even if the user is already connected. This creates the infinite loop cycles. // Here we specify what we do with the response anytime this event occurs. if (response.status === 'connected') { // The response object is returned with a status field that lets the app know the current // login status of the person. In this case, we're handling the situation where they // have logged in to the app. // testAPI(); FB.login(function(response) { if (response.session == 'connected' && response.scope) { FB.api('/me', function(response) { window.location = "http://www.mywebsite.com/checkloginfb.php?email=" + response.email; } ); } } , {scope: 'email'}); } I would recommend separating, F

Categories : PHP

How to generate facebook access token for given app key and secret key using spring social facebook?
If you're wanting to use the token to access user-owned resources at Facebook (e.g., the user's timeline, friends, etc) there's no way to get a token without involving the user. That's on purpose so that you aren't allowed to fetch data or write data to Facebook without getting the user's permission to do so. But if that's what you want, then you must redirect the user to Facebook and back. This is OAuth 2's authorization code grant. Spring Social's ConnectController can help you with this. You might be able to do it via the JS API, but it's been awhile since I've done it that way and I know a few things have changed at Facebook in that regard. And it probably relies on OAuth 2 Implicit Grant (which involves a redirect). There is another way to obtain an access token without redirecting

Categories : Spring

How can I have a dynamic image show when someone clicks the Facebook Like button and Posts to Facebook?
Change the meta tag on click: use this example and modify it to your needs. <!DOCTYPE html> <head> <meta charset="utf-8"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <title>Title Of Page</title> </head> <body> <input type="button" value="Click Me" onclick='$("title").html("Changed Dynamically");'/> </body> </html>

Categories : Facebook

Why is facebook api asking this message on login with facebook for authorised users - "Application name" would like to access your friend list.?
The Facebook app authorization screen says that the app would like to access your friend’s list. But in truth, the app probably didn’t ask for that. The friends list is part of every app authorization, whether the app wants it or not. This is because Facebook wants apps to add social context, which can only be done with the friends list. But this doesn’t give the app the ability to contact your friends on your behalf, at least not more than it could do so without you adding the app anyway. Check for an reference https://www.facebook.com/about/privacy/your-info-on-other#applications

Categories : Facebook

Fetch facebook user public data, which available without loggining througth Facebook Graph API if any exists
This isn't possible unless you have an access token. The public graph doesn't reflect the browser information it reflects what is given in the documentation https://developers.facebook.com/docs/reference/api/user/

Categories : Java

How to fetch Facebook UserName, Email, phoneno etc from Facebook Authentication for Spring Security in Grails
You have to put it into your implementation of FacebookAuthService. Just create service with such name, and add method onCreate with this code (or similar). And don't forget ot add Spring Social Facebook as a dependency

Categories : Facebook



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.