Differentiate between types of open graph object pages - html

One of our applications uses open graph tags so that when users like or comment on a page, the resulting feed story is rich with content, images etc.
Another part of our application (the web platform side) allows users to connect to a Facebook profile page so they can manage the wall, add apps to their profile page etc.
Trouble is, by calling /me/accounts, you get all open graph objects that user has rights to and not just the proper profile pages.
Is there any way to differentiate between types do the users don't have potentially thousands of pages to sift through when they want to connect to their profile page? For example, in Facebook, if I click "Use Facebook as a Page" in the top right drop down, that list is filtered to be just the profile pages and not every single open graph object I'm considered an admin for. How can we get just that list of pages?

you can use FQL for that, the following query should give you relevant info:
SELECT page_id, type
FROM page_admin
WHERE uid=me()
AND type="COMPANY"
hope this helps

Related

Is it possible to see which tab is open in the Chrome when your website/web app is open in browser?

I want to create a web app(for practicing my skills) that will help in conducting online exams. So I want to ask that is there any way to find out the following things---
Is there another page opened in the chrome (if yes then which)
Is there is another application running in the background (if yes then which)
Is user switching between tabs/applications/desktops etc.
Basically, I just want to create an app that just keeps track of users' activity when the user is giving an exam.
And if you have any of the solutions to the above problems then please tell.
Since most things you want to access are considered private data, it is not directly possible in a Web App, except the page visibility. But you can write a browser extension, which is at least allowed to access data within the browser. For information beyond the browser you should consider a native application or some embedded solution like React Native, Xamarin, or Electron, to name a few.
To get the info if the user is currently using the tab your Web App is running in, use the Page Visibility API:
https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
For accessing information about other tabs and browser internal stuff, write an extension:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API

Multiple topics in one embedded yammer feed

I want to embed a yammer feed on a sharepoint 2010 site and I want more than just one topic in it. I can set up a feed for #Yammer OR #YammerHelp but not both, at least not both in the same feed merged together. It seems they get embedded one after the other.
Is there no other way than to set up two feeds, one for each topic, in separate div-tags?
I use a content editor on a SharePoint 2010 page loading the standard script generated by Yammer.
Things I've tried:
feedId: "13267317",
feedId: "24515"
or
feedId: "firstid" "secondid",
All help is appreciated!
There is no way to do that with the current API. If you retrieved the messages from the REST API directly you could combine the two feeds, sorting by created_at, but not via Yammer Embed.

Restrict a page in Bolt CMS to a set of users

I'm working with Bolt CMS and I would like to create a new section on our website that is only accessible by a set of authenticated users. These users can only view the pages within this section of the site. Anonymous users would not see this section of the website in the menu, nor would they be able to navigate to it.
I see where I can create content types and assign roles to the types via permissions.yml, but how does that translate to authenticated page views? Is this possible without custom coding?
Backend permissions do not carry over to the front end, they are very deliberately kept separate.
There is an extension (bolt/members) being developed for the upcoming Bolt v3 that will implement this functionality, but still very separately from the backend.

Sharing custom content based on target

I am implementing "sharing" feature for WP8.1 XAML app. Is that possible to customize the content based on the the target?
For example, if I want to share the texts in Twitter it will share different texts from Facebook or email.
No it's not possible. Once you show share UI, the data request event is fired and data is generated before the user chooses the app.
If you are interested what user has chosen, you can try with TargetApplicationChosen event, which should allow you to get the name of choosen app. Nevertheless it's after the data is genereted, so this can be used when preparing default data for future requests.

Mediawiki to display different links to different geographic locations

Scenario: An intranet site is accessed from two different countries through different site names. We use mediawiki as knowledge base and wish to reference this intranet site. mediawiki is used by teams in both countries.
Currently we are providing two different URLs in the wiki. example:
Country one: ur1.in.intranet\hello\world
Country two: ur1.en.intranet\hello\world
Problem: How do we ensure that the correct (accessible) intranet site address is presented to the person accessing from each country?
I have tried to find information using wiki templates. Say, while authoring, all users must use a specific template {{Intranet_Page | < URL >}}
In the template, a code could check the IP of the accessing user and determine which site name has to be used. I was unable to find the right special word for finding the IP. :(
Is there any way... PHP modifications / Templates / others?
It's not quite clear what you want. If I understand correctly you want a wiki page to contain a link to an external website, which exists in multiple variants depending on country. The page should be served to the visiting user with the link rendered in the correct country variant.
This is similar to the issue of linking a translatable page but redirecting the user to the user's (interface) language's subpage thereof. To do so, MediaWiki core provides Special:MyLanguage, a redirect special page.
A redirecting special page is the easiest solution for such issues because:
the page HTML doesn't need to vary based on each parameter (in your case country) but can be cached identical;
you gain a canonical URL for the resource, which is the same for everyone to link and yet brings everyone to the correct variant.
See https://www.mediawiki.org/wiki/Manual:Special_pages on how to make a special page and https://www.mediawiki.org/wiki/Extension:GeoIP or similar to extract country from IP.