w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
I cant get user email address on facebook
You are doing it right, but the email will only be displayed for the users who have set their privacy options for their emails to be shown to all, otherwise it wont display you the email of the user.

Categories : PHP

Is it possible to talk with the users of my Facebook app through Facebook chat?
No, you are unable to do this. The only way would be to friend the users and then use the chat. Technically your app is not sentient and therefore unable to "chat". An alternative for you might be to request the users email address from permissions and then contact them using this.

Categories : Facebook

How to find out, if facebook ID is a user, group or page
As far as i'm aware, there is no way to simply get a "type" back from facebook, as they assume you know what the ID is supposed to relate too anyway. The best thing i can think of is to find an attribute which is unique to each object, and check if it exists on the returned data from ://graph.facebook.com/id You will want to check the documentation and return data for the best key/attribute to check, but from a quick look at the docs, you could possible check: If company exists, assume its an application id If first_name exists, assume its a user id If owner exists, assume its a group The advantage being that once you determine the type of the ID, you already have the data you need for the object, to do whatever consequent actions. N.B: The fact you don't know the type, leads me to

Categories : PHP

How to find out if a user's facebook friend has joined my app?
Instead of fetching the users friends and comparing them to the users in your database, simply use this API call: /{user_id}/friends?fields=installed Of course you can add other fields to this list to get more data of the friends.

Categories : Ruby On Rails

How do I get the posts of a closed Facebook group using Facebook PHP SDK?
You need to request the user_groups permission to access a closed group information. To read a Group, you need: any valid access_token if the group is public (i.e. the group's privacy setting is OPEN) user_groups permission for a user's non-public groups friends_groups permission for a user's friend's non-public groups Groups for Apps and Games require the use of an App access_token Source: https://developers.facebook.com/docs/reference/api/group/

Categories : PHP

Can I post in facebook user wall and facebook fan page automatically when user is not active?
If a user authorized your app once, you can get the long-lived token (expiry: 60 days), and then use this to do actions on the user's behalf at any later time (till the token is expired- you'll have to refresh the token in that case) Here's how you can exchange the normal access token with the long-lived token: Expiration and Extending Tokens And to refresh the long-lived token, you have to repeat the same procedure again, by logging-in the user to your app again.

Categories : Facebook

Comment like Facebook in iOS chat
Well you can try one of these controls .... hope they help you .. https://github.com/brutella/chatheads https://github.com/kenshin03/Home-For-iOS

Categories : IOS

Facebook Xmpp Chat API Error
function recv_xml($fp, $size=4096) { $xml = fread($fp, $size); if (!preg_match('/^</', $xml)) { $xml = '<' . $xml; } if ($xml === "") { return null; } // parses xml $xml_parser = xml_parser_create(); xml_parse_into_struct($xml_parser, $xml, $val, $index); xml_parser_free($xml_parser); return array($val, $index); } This can help you. https://developers.facebook.com/bugs/192933747546649

Categories : PHP

Why can't I authenticate to Facebook Chat in my iOS application?
I found my answer. In case anyone else runs into this same problem: I never actually told my XMPPStream to connect. I had tried all of the connect methods before, but they never worked. I now realize that I simply did not wait for them to finish connecting. Here is what I ended up changing: NSError *error; NSError *err; [_xmppStream connectWithTimeout:10.00 error:&err]; [_xmppStream authenticateWithFacebookAccessToken: FBSession.activeSession.accessTokenData.accessToken error:&error]; while (error) { sleep(1); [_xmppStream authenticateWithFacebookAccessToken: FBSession.activeSession.accessTokenData.accessToken error:&error]; } I realize that it's not the most elegant solution, but it works.

Categories : Iphone

When "zoom in" at Facebook, the chat sidebar got hidden, but how?
I'm not sure about the exact solution Facebook is using but I discovered they hide the sidebar on both window resize and zoom. My research shows that all browsers, including IE8 and up fires the window.resize event when zooming as well. So by setting some breakpoint when you wish to hide something you should be able to implement some similar functionality. Quick and dirty example: http://jsbin.com/ofufer/1/

Categories : Javascript

iOS: Facebook chat heads behaviour and animations
To answer @StuartM's question in the comments, in the last couple of months I've had a bit more experience with UIKit, and I think I have a rough idea on how I would implement something like this if I was going to do it. What I would do is for the chat head, create a styled UIButton and add it as subview to the main Window. For the dragging, I would add a Gesture Recognizer to the UIButton to respond to the drags, and for the "snapping to edges" I would use iOS 7's new UIKit Dynamics (http://www.raywenderlich.com/50197/uikit-dynamics-tutorial). As for showing the UITableView overlay with the chat history, I would use a Child View Controller (https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContain

Categories : IOS

Get User's IP Address in a Share Point Web Part not giving valid IP address
Use this, string ip = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (string.IsNullOrEmpty(ip)) { ip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; } Or use string ipAddress = Request.UserHostAddress

Categories : C#

Find Computer Name,Operating System name of a given IP address or MAC address In java
import java.util.Map; public class EnvMap { public static void main (String[] args) { Map<String, String> env = System.getenv(); for (String envName : env.keySet()) { System.out.format("%s=%s%n", envName, env.get(envName)); } } } I guess you need the following properties: COMPUTERNAME OS regarding MAC Addrss and IP Address you have 2 options: use InetAddress ip; try { ip = InetAddress.getLocalHost(); System.out.println("Current IP address : " + ip.getHostAddress()); } catch (UnknownHostException e) { e.e.printStackTrace(); } or use ipconfig/ifconfig output but I'll leave the choice it to you

Categories : Java

Sending a chat message in Facebook using Javascript using the browser console
document.getElementsByClassName returns an array of elements. In this case they will have same number with the chat boxes opened. I wrote it in pure Javascript: var o = document.getElementsByClassName("uiTextareaAutogrow _552m"); // set the chat textbox var chatTextBox = o[0]; // set the message value chatTextBox.value = "Hello"; // create a keydown event var e = new Event("keydown"); // it has to simulate the Enter press (key code is 13) e.keyCode = 13; // trigger it chatTextBox.dispatchEvent(e);

Categories : Javascript

Get real url address that user typed in address bar in browser
RawUrl only contains the server path, without the domain, which seems to be the most interesting part for you. In that case, it seems like a duplicate of What's the best method in ASP.NET to obtain the current domain? Here the solution was to use Request.Url.Host

Categories : C#

How to make resizable, scrollable sidebar like Facebook's "Chat/Event Ticker"?
I've done something similar using CSS3 resizing on the fixed sidebar (mine was on the left) and adjusting the main page's margin-left when the sidebar size changed. You could likely do something similar on the sidebar first, then split the sidebar in two the same way. var sizeme = 200, sizeItBro = function () { if ($("#sidebar").width() != sizeme) { sizeme = $("#sidebar").width() + 40; $("#main").css("margin-left", sizeme + "px").text(sizeme + " pixels of margin."); } }; window.setInterval(sizeItBro, 150); * { -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box; } body { margin:0; padding:0; } #main { margin-left:200px; min-height:100%; padding:20px; } #sidebar { position:fixed; top:0; bottom:0; lef

Categories : Javascript

Read closed facebook groups
The idea of a closed group is that only specific people (at the discretion of the current members) are allowed access to it. Your app will not be able to access the group. If you want an app to make posts, etc that members can see, your best bet is to make an app page that people can like instead.

Categories : Facebook

Responsive CSS: Replicating how Facebook's chat panel disappears below a certain browser window width
Yes, it's using CSS Media Queries. <style> @media (min-width: 701px) { //css for wide screen } @media (max-width: 700px) { //css for narrow screen } </style>

Categories : CSS

How to find user ids who have liked a post or commented on a post on my facebook page?
This is much easier than you think. The key is getting the post_id from the stream object. SELECT user_id FROM like WHERE post_id IN( SELECT post_id FROM stream WHERE source_id=YOUR PAGE ID) What we are doing here is grabbing all of the posts on your page and then querying the like table for users that liked those posts. The call for comments is almost identical except the column you are looking for is fromid instead of user_id SELECT fromid FROM comment WHERE post_id IN( SELECT post_id FROM stream WHERE source_id=YOUR PAGE ID)

Categories : Facebook

Facebook Session Destroyed after application closed
The key to this solution and the cause of the problem is likely found in the access token used. My guess is that you are currently using a short access token. If you would use a long term access token, see, https://developers.facebook.com/docs/facebook-login/access-tokens/, and store it in a persistant manner the problem would be solved. Since you are using Android I would store it in SQLite and retrive upon application startup/resume. From Facebook developer site: Expiration and Extending Tokens Some access tokens have a finite validity period of about one to two hours. In order to continue using these tokens after the expiry time, they need to be extended. Apps using the Facebook SDKs for Android and iOS, desktop apps or apps using the server-side login flow automatically

Categories : Android

chat.facebook.com doesn't send zero byte at the end of the cross domain policy file response
This does appear to be a Facebook bug. I've verified this by performing a Wireshark link against the Openfire XMPP server (which works correctly). Have reported the bug with FB: https://developers.facebook.com/bugs/707541335928781

Categories : Facebook

How do I connect to Facebook chat using Username/Password auth option and successfully send a message in either Javascript or Ruby?
From the Facebook API Docs: Authenticating with Username/Password The DIGEST-MD5 SASL mechanism is available to support traditional XMPP or multi-protocol IM clients that are not customized for (or even aware of) Facebook. This mechanism requires prompting the user for his or her password; therefore, it should only be used when necessary. In particular, it MUST NOT be used for any client that: Proxies the XMPP connection (the connection must be directly from the user's computer to Facebook). Reports messages or any other information about user activity to a third party (including the client developer). Integrates with Facebook, or has a Facebook Application ID. If your application does any of the above, you must use Facebook Platform authentication instead.

Categories : Javascript

Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http]
You can't host net.tcp under IIS 6, it supports only HTTP(s). So you are limited with HTTP bindings only (basic, ws or 2007). In order to provide net.tcp and other protocols, WAS is required. You can activate it standalone, but I advice you to install it both with IIS 7 (it is installed as a part of it), because IIS 7 gives a convinient service management platform in addition. Another solution it so change the hosting environment to make it self-hosted or service-hosted, using ServiceHost class instance, which supports tcp protocol.

Categories : Wcf

Node js chat server - user auth
There is a way you can access your website user session in Nodejs. You need to use separate session storage which can be accessed by both Webserver and NodeJS. So this will fix your user 'Authenticaion' in both servers. I chose Redis over Memcache for custom session storage because you don't want to lose all your existing session data on server restart. If you are using PHP https://github.com/nicolasff/phpredis will help you install the Redis extension. And for Nodejs you can easily search, install and configure the Redis. Refer here for more useful info http://webandphp.com/IntegratingNode.jswithPHP

Categories : Node Js

WPF Chat List Box - With user Image display
I really think you should first spend some time learning basics in WPF than jumping straight into pulling together multiple aspects in an app. Maybe this could help - a sample ^^ Project has everything I stated in my comment on your question. I've chosen to not base this sample on MVVM cos that might just confuse you further(please just use the sample as an idea and do look into MVVM if you havent done so already) Try to see if you can first understand the sample before dealing with databases and if not get a book on WPF and start reading. Can't really go any more basic than this. In the sample, Friend.cs should be similar to what you posted with the addition of the INPC implementation. MainWindow.xaml should show how the ListBox.ItemTemplate holds a DataTemplate and is setup to Bind

Categories : C#

How to create a multi user chat app in android using asmack
Have you looked at the MUC docs on the Openfire community site? They provide plenty of example code. Also in aSmack you need to init some static code/providers manually as in normal smack it reads these from an META-INF file which davlik vm does not utilise. eg: call this when your activity/application first loads Class.forName(org.jivesoftware.smackx.muc.MultiUserChat.class.getName(), true, ctx.getClassLoader()); from: InitStaticCode.java Alternatively just call Context context = getApplicationContext(); SmackAndroid asmk = SmackAndroid.init(context); which will init all providers. BTW what server are you using, it must also support MUC creation?

Categories : Android

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

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

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

When creating a user by Membership.CreateUser, is there a .NET wrapper that can set the user's address, city, state, zip, etc.?
You can create an another table and use foreign key as UserId i.e. UniqueIdentifier and same used in aspnet_Users table. Using the UserId you can manage all membership tables with this new created table.bcoz asp_net_membership table already linked with aspnet_user table. When the status of membership create user will be success, then create a row in newly created table..

Categories : C#

I find a code block in chat.c a module of ppp project,but I can't understand it
Like the comment says, it's internal state the macros use to remember where they are and what they're doing. Nothing you need to worry about unless you are reimplementing the code, in which case the complete lack of documentation apart from that comment and the general coding style suggest you might have a problem. As it's static it is only accessible from that file (God help you if that code is from a header) and it has a lifetime the same as the executing program. But basically, you should not touch _O in your code.

Categories : C

Facebook user email is not accessible in some devices of Android for Facebook sdk 3.0
In my opinion, you should create an object of OpenRequest as shown on this link of Stack Overflow. It might solve your problem. :- Set permission for getting User's email ID from Facebook Login

Categories : Android

How can I open a com.facebook.Session to get user's facebook friends list?
session.openForRead(new Session.OpenRequest(this).setCallback(callback).setPermissions(Arrays.asList("your_permissions"))); This link might help you. EDIT: public void getBirthdays(){ Request fBdays = Request.newMyFriendsRequest(Session.getActiveSession(), new Request.GraphUserListCallback() { @Override public void onCompleted(List<GraphUser> users, Response response) { if(response.getError() == null){ for(GraphUser usr:users){ Log.d(TAG,usr.getName()); } } } }); Bundle requestParams = fBdays.getParameters(); requestParams.putString("fields", "name,birthday,picture");//for extra properties fBdays.set

Categories : Android

How to recognize returning Facebook User using the Facebook Login Widget
I have been working on a similar application which uses either Facebook (OAuth), Google (OpenId) or a manual registration login approach. My prefered solution was to ask the user for their email address, you will need to request extended permissions on the email field from Facebook as it is not offered up by default. http://developers.facebook.com/docs/authentication/permissions My table structure looks like this. User Id (int) Email (nvarchar(256)) FacebookToken (nvarchar(256)) GoogleToken (nvarchar(256)) The advantage to this method is you are able to link up your users to the right account if you decide later to add another authentication / identification service or roll your own. It won;t matter if they login to FB, Google or Twitter - you always know whcih account t

Categories : C#

How allow other user on skype to chat withou having then on the contact list using Skype4COM?
AFAIK, no. There is SKYPE4COMLib_TLB.pas type library which you can use to interact with Skype. You have to import in Delphi (Tools > Import a Type Library > Skype4COM 1.0 Type Library). From what I've seen, it doesn't expose Privacy settings for the current user.

Categories : Api

Sending form data to my email address and address entered in form by user
$to = "diysoakwells@hotmail.com;" . filter_var($emaile, FILTER_VALIDATE_EMAIL); You may also want to try this.... $to = "diysoakwells@hotmail.com;<" . filter_var($emaile, FILTER_VALIDATE_EMAIL) . ">";

Categories : PHP

Phonegap + Facebook + PHP backend: Facebook user login
So I ended up implementing a "Facebook_Volatile" class like this: /** * Extends the BaseFacebook class with the intent of NOT using * PHP sessions to store user ids and access tokens. * @Author Felipe Guaycuru <guaycuru@gmail.com> */ class FacebookVolatile extends BaseFacebook { // Stores the shared session ID if one is set. //protected $sharedSessionID; // Stores data non-persistently private $storage = array(); /** * Identical to the parent constructor. * * @param Array $config the application configuration. * @param String $access_token the supplied access token. * @see BaseFacebook::__construct in facebook.php */ public function __construct($config, $access_token) { parent::__construct($config); $this->setAccessToken($access_token)

Categories : PHP

How to show facebook like button even if user isn't logged into Facebook?
It displays regardless of whether a user is logged in or not. If the user is not logged in and clicks on Like, they get a popup that says "You must log in to see this page." Are you sure you're including the fb-root div and the Javascript? <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=Your-App-ID-HERE"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>

Categories : Javascript

Getting Facebook Access Token from User Id and Facebook App Secret?
The way to do it was using "The Login Flow for Web (without JavaScript SDK)" api to get a user access token. A user access token is required to be sent with graph api queries in order to get page posts. The first step is to create an app on facebook where you specify what information you want the program to be able to access via the graph api. The end user will then choose to accept these permissions later. The program creates a web browser frame and navigates to https://www.facebook.com/dialog/oauth?client_id={app-id}&redirect_uri=https://www.facebook.com/connect/login_success.html&response_type=token The response type "token" means that when the (embedded) web browser is redirected to the redirect_uri the user access token will be added to the end of the url as a fragment. E.g

Categories : Facebook

Facebook spamming user@facebook.com email sent from server
Facebook is transitioning away from the ability to send emails via an API call on Mar. 1st. To compensate, they allow apps to now ask for a user's email address directly. If you set the email domain in your app's settings, then asking for the email extended permission gives you the users email address instead the ability to send an email via the API. As of Mar. 1, the API will stop working and you are left alone to figure out your own email solution. This goes for regular notifications, both user to user and app to user, as well From here And: Please note: We are in the process of deprecating the REST API, and will not be adding support for this in Graph API. Developers should directly send email to users once they are granted permission. From here However

Categories : Facebook



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