integrate skype for business with my web app - javascript

I want to integrate skype for business with my web app, just want to open the app on button click.
There is a way to open a chat window with some specific user via below line in js:
document.getElementById('skypeChat').href="im:<sip:"+textEmail+">";
but i want to only open the app and land on the home screen of the app and not to initate any chat.

I managed to get it working by setting textEmail to the user's own email address.
For example, if your application knows that the user is using SfB address john.doe#domain.com, then this should (could?) open SfB on the starting page:
const textEmail = "john.doe#domain.com";
document.getElementById('skypeChat').href="im:<sip:" + textEmail + ">";
Presumably this happens because they can't chat with themselves, and no error is shown - or at least that is what happens for me; your mileage may vary.

According to documentation you have to use skype:, not im:.
Also to simply activate Skype, you should leave empty action.
document.getElementById('skypeChat').href="skype:";

Related

is there a third-party javascript library/social media sharing service that can use custom query parameters for the share link?

The Goal and the Problem
I am working on a sharing solution in our React-based video and audio search apps. My goal is that when sharing a single item from a search result set to a social media app (e.g. Facebook, Messenger, LinkedIn, Twitter) and then clicked by someone else, the user lands within our search app/experience with only a single result showing (the shared item), which is done using query parameters in our search apps. Imagine using Google image search, and creating a little share icon on each search result so that when hovered/clicked/tapped and shared to social media then clicked by someone on said social media channel, the user lands in Google image search with just that single shared item in the result set.
We've been challenged to find a third party solution that uses custom query parameters for share links on each search result to help us achieve our goal. They all seem to use the base url structure (window.location.origin + window.location.pathname e.g. https://www.clipstock.com/audio) which won't work properly to show a single search result within our search experience which needs a query parameter as shown in the example below. Note: this url approach works fine for sharing a full page "node" with just the single video or audio result on the page, which we're also doing separately.
We've built a custom solution in our React based search apps that does achieve our goal of having the user land within our search app with just a single search result although we expect our custom solution to break if/when sharing urls in social apps update which seems to happen yearly or so. We figure a third party JavaScript library or third party social share service will fix these issues faster and cheaper without our development time if/when the sharing URLs break.
Has anyone seen a third party solution to this?
Examples
Example link for landing on a single search result in our audio search app, achieved by the search query q="Reunited" in the url: https://www.clipstock.com/audio?q=%22Reunited%22&size=n_12_n
Example share link of our custom solution for sharing the above search result on Facebook today, which seems to change by the year (note the https://www.facebook.com/sharer/sharer.php?u= part of the url, which is the part that may break from Facebook updates): https://www.facebook.com/sharer/sharer.php?u=https://www.clipstock.com/audio?q=%22Reunited%22&size=n_12_n
Example link of a single video clip node page, which works well with any third party sharing solution, although isn't the goal of this question which is to land in our search app(s) with just the single shared item in the result set which is achieved using query parameters as seen in the examples above: https://www.clipstock.com/clip/young-male-swimmer-diving-starting-block-olympic-size-pool-lanes-slow-motion
The below approach to sharing works for us, although is the custom sharing solution we created that may break over the years. In this example, on mobile, the Facebook app opens, and on non-mobile, the Facebook web app opens, which is our goal. Either of the Facebook share urls (and the share urls for each other social media app like Messenger, LinkedIn, Twitter) could change over time since they're essentially API integrations and we think it would be cheaper & faster to invest in a third party sharing solution than to monitor for these breaks and fix the breaks ourselves.
Note: some setup code in the below example is not included such as the DrupalContext. We aren't getting errors in the code, rather, we're looking for a third-party solution so that we don't have to maintain custom code.
const drupalContext = useContext(DrupalContext);
const queryString = type === "sfx" ? drupalContext.sfxQueryString : "";
const baseUrl = window.location.origin.concat(window.location.pathname);
const sharingLink =
type === "video"
? baseUrl.concat("?q=").concat(nodeId)
: baseUrl
.concat("?q=")
.concat(encodeURI('"'))
.concat(encodeURI(title))
.concat(encodeURI('"'))
.concat(queryString);
const shareViaFacebook = () => {
let shareUrl = "";
if (platform?.os?.family === ("iOS" || "Android" || "Windows Phone")) {
shareUrl = "fb://share/?link=" + sharingLink;
} else {
shareUrl = "https://www.facebook.com/sharer/sharer.php?u=" + sharingLink;
}
window.open(shareUrl);
};
We've created similar shareVia... methods for each social media app we're sharing to which currenly consists of Facebook, Messenger, LinkedIn, Twitter, Email, and "Copy Link". Email and "Copy Link" are what we're going to fall back to using if we can't find a reliable third-party solution (removing Facebook, Messenger, LinkedIn, and Twitter sharing options) since Email and "Copy Link" reliably work and we don't expect these two options to break over time.

Pop-up a webresource in new window in Microsoft CRM

I am creating a timer application for Microsoft CRM. I created the application as a web resource already and it works. It uses CRM's XRM client-side code to do the work. It needs to update data in a custom entity within CRM. However requirements for the timer application have changed and it now needs to stay active even if the user navigates away from the page. So it needs to open on the incident form, but then the user could navigate anywhere else in CRM and it needs to stay open and actively tracking time.
My first thought was to just pop the web resource into a new and separate window on the button click and have it run independently. However, if the code is embedded inside a web resource in the form, if they navigate away won't the code get unloaded?
I have only been working with Microsoft CRM for a few months, so I probably don't know all the options.
So the specific question:
Is it possible to open up a stand-alone web resource in a new window that stays active when they navigate away from the form and still have access to the XRM client library? (if so, how?)
If the answer is no, then I'd love to hear alternative ideas.
Thank You.
To solve this scenario I used 2 web resources. One on the form that has a custom button to gather required case information and send it to the second web resource:
// Collect fields we know exist at this point, because they are required fields on the case
var caseId = window.parent.Xrm.Page.data.entity.getId();
if (caseId != '') {
var caseName = window.parent.Xrm.Page.data.entity.getPrimaryAttributeValue();
var accountId = window.parent.Xrm.Page.getAttribute("customerid").getValue()[0].id;
var accountName = window.parent.Xrm.Page.getAttribute("customerid").getValue()[0].name;
// package paramters to pass to timer web resource
var customParameters = encodeURIComponent("caseid=" + caseId + "&casename=" + caseName + "&accountid=" + accountId + "&accountname=" + accountName);
// Open web resource
window.parent.Xrm.Utility.openWebResource("sp_casetimer", customParameters, 500, 200);
} else {
// Error message would go here - case must be saved first.
}
The sp_casetimer web resource then parses and stores the variables into hidden fields and can function independently. I use the /XRMServices/2011/OrganizationData.svc to then do CRUD operations on my custom case time entity.

Binding a web page's element to an Android App

There is a website which has a login screen, and when the submit is hit, it goes to a new page and logs in the user.
Here's a screenshot :
Now, Suppose I have a similar login screen in my android app, like this :
Now, Is there a way to link both of them, so that, when I hit login in the android app, it actually registers a submit at that website and logs in the user, and obviously, then again, binding the next webpage that shows up after logging in. How dlink the urlfrom the webpage to the js and elements in an android app?
I know there has to be javascript, but how?
Have you Checked this : http://developer.android.com/guide/webapps/webview.html
and this : http://www.codeproject.com/Articles/392603/Android-addJavaScriptInterface
While login we sends the form data from Android application to the Server-side page (JSP, Servlet,ASP or PHP), then those page will compile the required operation for login validation using any database , then it returns “1” if the login is valid else return “0”.
Hence you have to find out all the parameters that are working around once you click the login or register in that website.Also login page may contain cookies and other temp storage that will be required at each login.Also you need to find the methods used.
So understanding the webpage configurations ,parameters and functionality will help you achieve using android tools like webview(just a tool,not logic).
First make a detailed study on all the required parameters and functionality of the webpage then get started with the app.
Below is a list of reference links that may help you to tackle the issue :
Refer 1,
Refer 2,
Refer 3,
Refer 4,
Refer 5
You can also see this site to solve ur probelm ...
https://wowjava.wordpress.com/2011/01/16/login-application-for-android/
or
http://webdesignergeeks.com/mobile/android/android-login-authentication-with-remote-db/

Facebook Feed Dialog: Post not showing up on friend's wall even though I get a response id

I am creating an app on facebook and I am trying to post to a friend's wall. I'm using the facebook javascript SDK and the FB.ui method to do this. In short here is my code:
function test() {
var obj = {
method: 'feed',
to: '######'
};
function callback(response) {
alert(response['post_id']);
}
FB.ui(obj, callback);
}
Note that I made this code very simple for testing purposes.
When I run it, a facebook feed dialog opens correctly and at the top says "Post Story to friendsname's Wall". I type in a message and press Share. My alert pops up with a response['post_id'] number. Because there is a response['post_id'] the story should've been posted successfully right? However when I navigate to the friend's wall there is no story. I've tried this multiple times in slightly different ways and haven't been able to get it to work. If I remove the 'to' parameter and simply post to my own wall it -does- work. So for some reason, posting to a friend's wall breaks it?
I know it's a rather broad question but I was wondering if anybody had any ideas why this doesn't work. Thanks
I suspect the problem may be because your application is in sandbox mode - https://developers.facebook.com/docs/ApplicationSecurity/
When testing your apps, place them into Sandbox Mode. This hides your
app entirely from all users who you have not authorized in the
developer app to see the app, for the roles described below. Please
note that when your app is in Sandbox Mode, you cannot call any API
calls on behalf of users who cannot see your app.
Basically, if your application is in sandbox mode, nothing your application does can be seen by users who have not authorized your application or by users that have not been specifically listed in the "roles" within your applications settings.
Remove you application from sandbox mode or add some users to specific "roles" within your application.

Simple AIR Notification App (noob)

I would like to create a simple AIR app that show's a notification on the bottom right of the users screen. this app won't show all of the time, it will just show if I push a new notification to the users computer. I am doing this in Dreamweaver. It will open on Windows XP computers only.
So far I have found out how to show a notification window with my html file:
notification.load( new air.URLRequest( HTML_SOURCE ) );
What I am not clear on is:
how to have this happen automatically on login.
how the AIR app can check if a new msg is available.
how best to exit the app
Thanks for any help!
For starting application on login, you have to set air.NativeApplication.nativeApplication.startAtLogin = true
For details u=you can have a look at this adobe article.
You can store messages with a increasing message_id column. So when your application shows any message it can store that value as last_message_read in your data. Then you can use this value to check if new messages are available (You will have to save this variable in a file)
For exiting application you can use air.NativeApplication.nativeApplication.exit();
or just close your main application window by close(). It will automatically close your application.

Categories

Resources