Facebook FQL returning inconsistent results? - facebook

I've got a question around why some items are not returning via a Facebook FQL query.
The following query:
https://api.facebook.com/method/fql.query?query=select%20page_id,%20name,%20type,%20fan_count%20from%20page%20where%20name=%27Bauhaus%27%20and%20type%20=%20%27MUSICIAN/BAND%27%20order%20by%20fan_count%20desc
Is supposed to return me pages whose name = 'Bauhaus' and type is 'Musician/Band'. The result is:
<fql_query_response list="true">
<page>
<page_id>186907181359330</page_id>
<name>Bauhaus</name>
<type>MUSICIAN/BAND</type>
<fan_count>1</fan_count>
</page>
<page>
<page_id>175833025805207</page_id>
<name>Bauhaus</name>
<type>MUSICIAN/BAND</type>
<fan_count>0</fan_count>
</page>
</fql_query_response>
If I then add a constraint, page_id=109194179106090, which doesn't appear in the above list: https://api.facebook.com/method/fql.query?query=select%20page_id,%20name,%20type,%20fan_count%20from%20page%20where%20page_id%20=%20109194179106090, I get this result:
<fql_query_response list="true">
<page>
<page_id>109194179106090</page_id>
<name>Bauhaus</name>
<type>MUSICIAN/BAND</type>
<fan_count>100527</fan_count>
</page>
</fql_query_response>
Why should adding a constraint return me an item that isn't in the original query?

In FQL, adding a constraint of a page id automatically adds it to the query, assuming that you know exactly what you want and won't be narrowing it down by other criteria.

Related

Can I GET without the ID?

I need to get a result from a table where I only know a few values from a report.
Which is the EntryID found on the 3rd line and the description
I'm only new to RestApi's
But how could i filter through and fine this particular result without having the transaction ID.
My url looks something like this
https://publicfacingURL/ServerName/services/select/Transaction/{transactionid}
<Transaction>
<TransactionID>1656286</TransactionID>
<EntryID>39013</EntryID>
<ChargeGroupID>88</ChargeGroupID>
<ChargeItemID>0</ChargeItemID>
<TransactionTypeEnum>Payment</TransactionTypeEnum>
<TransactionDate>2020-01-04T22:22:57.427</TransactionDate>
<ProcessedDate>2020-01-04T22:23:44.74</ProcessedDate>
<DueDate />
<Description>Web account payment #WEBR123123</Description>
<Amount>-398.0000</Amount>
<Duration>0</Duration>
<CallTypeEnum>Other</CallTypeEnum>
<Comments>CC Type used: Visa</Comments>
<Reference_BookingID>0</Reference_BookingID>
<PaidFrom />
<PaidTo />
<Excess>0</Excess>
<ExternalReceiptID></ExternalReceiptID>
<DateModified>2020-01-04T22:23:44.773</DateModified>
</Transaction>
I just updated to reflect the following below.
https://publicfacingurl/ServerName/services/select/transaction?entryid={entryId}
Thanks for everyone's help.

Insert table in XML-view

I created a table in my controller-function onRoutePatternMatched.
Now I want to bring this table to the view.
This should be done with oTable.placeAt("sample1");
What is the right code to insert it on a specific place in my xml-view?
Home.view.xml
<?xml version="1.0" encoding="UTF-8" ?>
<mvc:View controllerName="ztest.controller.VarConf" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
xmlns:html="http://www.w3.org/1999/xhtml">
<Page>
<content id="sample1"></content>
<content id="sample2">
<Label text="{varConfDet>/chassisnr}" />
</content>
</Page>
</mvc:View>
Error:
sap-ui-core.js:152 Uncaught Error: DOM element with ID 'sample1' not found in page, but application tries to insert content.
put an id on on the page and not on its content aggregation(s): <Page id="myPge">
in Controller call this.getView().byId("myPage").addContent(oTable);
Because content os the default aggregation of the sap.m.Page you could also only call this.getView().byId("myPage").add(oTable);. Also be aware that you might to remove previously added content... Of course, you could also use different panels etc. with different ids and place the table somewhere in there...

Typo3 6.2: Table Records in FCE (Flux)

I am trying to get a list of table-records in my FCE.
In documentation, i found the part "items" can use a Query.
But i can not find a way to make it work.
<flux:field.select name="myRecord" items="NOTHING WORKS HERE" label="Choose" maxItems="1" minItems="1" size="5" multiple="false" />
Does anybody know how the items can be filled with table-records ?
If you are trying to get the select box with all items maybe you can then switch to this:
<flux:field.relation size="1" minItems="0" table="tx_{YourExtensionName}_domain_model_{YourObjectName}" maxItems="1" name="package">
</flux:field.relation>
Of corse, you can use any table from the DB, like "pages"..
Hope it helps!

Wikimedia Commons API query to get count of sub categories and photos in a category

I want to query a Wikimedia Commons category and get the count of sub categories and photos in a category.
For example when you look at the web page "Category:Collections of the Brooklyn Museum" in Wikimedia Commons, you get the list of subcategories.
One of the subcategories
European art in the Brooklyn Museum‎ (7 C, 301 F)
has the numbers 7 C and 301 F which means this has 7 categories and 301 images.
How do I query the Wikimedia Commons to get this category and image count information of subcategories?
I tried the following queries
http://commons.wikimedia.org/w/api.php?action=query&list=categorymembers&cmlimit=100&cmtitle=Category:Collections%20of%20the%20Brooklyn%20Museum
which gives me the category members of the category.
I can do an action render query which produces the html representation from which I can scrape the 7 C and 301 F count information.
What query can I use to get this count information without the html scraping?
You can use prop=categoryinfo for this.
For example, the query:
http://commons.wikimedia.org/w/api.php?action=query&prop=categoryinfo&titles=Category:Collections%20of%20the%20Brooklyn%20Museum
returns:
<api>
<query>
<pages>
<page pageid="21253813" ns="14" title="Category:Collections of the Brooklyn Museum">
<categoryinfo size="105" pages="0" files="88" subcats="17" />
</page>
</pages>
</query>
</api>

CONFLUENCE: How to get page id displaying by my plugin

i have a small problem, i would like to get an id of displaying page in my plugin (id of searchskills.vm).
<xwork ... >
...
<action name="searchskills" class="de.twt.confluence.plugins.actions.SearchSkillsAction">
<result name="success" type="velocity">/templates/manager/searchskills.vm</result>
</action>
...
</xwork>
but i can't get it form:
page = getWebInterfaceContext().getPage();
it returns only null!!!
Is there a way to get a page id?
Thanks!!!
Take a look at this: Show page ID I'm not sure if that's the solution you are looking for, could you give us a more detailed description of what you're trying to do?